fix(GlobalCarousel/Jumpers/EditInfo): remove source field

This commit is contained in:
Aminejv 2021-11-01 07:54:05 +01:00
parent bc58d0362e
commit 112184fb3b

View File

@ -45,18 +45,16 @@ const STYLES_EDIT_INFO_FORM = css`
function UpdateFileForm({ file, isMobile, onClose }) {
const formRef = React.useRef();
const { getFieldProps, getFormProps, isSubmitting, values } = useForm({
const { getFieldProps, getFormProps, isSubmitting } = useForm({
initialValues: {
title: file?.name || "",
source: file?.source || "",
description: file?.body || "",
},
onSubmit: async ({ title, source, description }) => {
onSubmit: async ({ title, description }) => {
const response = await Actions.updateFile({
id: file.id,
name: title,
body: description,
source,
});
Events.hasError(response);
},
@ -86,17 +84,6 @@ function UpdateFileForm({ file, isMobile, onClose }) {
{...getFieldProps("title")}
/>
</div>
<div>
<System.H6 as="label" color="textGray">
Source
</System.H6>
<Field
full
inputCss={STYLES_EDIT_INFO_INPUT}
style={{ marginTop: 6 }}
{...getFieldProps("source")}
/>
</div>
<div>
<System.H6 as="label" color="textGray">
Description