mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-25 01:52:45 +03:00
fix(GlobalCarousel/Jumpers/EditInfo): remove source field
This commit is contained in:
parent
bc58d0362e
commit
112184fb3b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user