diff --git a/src/components/bars/SubmitBar/index.tsx b/src/components/bars/SubmitBar/index.tsx index e96b3695..053477aa 100644 --- a/src/components/bars/SubmitBar/index.tsx +++ b/src/components/bars/SubmitBar/index.tsx @@ -16,22 +16,29 @@ const SubmitBar: FC = ({ isLab }) => { const onFocus = useCallback(() => setFocused(true), [setFocused]); const onBlur = useCallback(() => setFocused(false), [setFocused]); + const createUrl = useCallback( + (type: string) => { + return [url.replace(/\/$/, ''), 'create', type].join('/'); + }, + [url] + ); + return (
- + - + - + - +
diff --git a/src/components/editors/EditorButtons/index.tsx b/src/components/editors/EditorButtons/index.tsx index 19dcb461..728093be 100644 --- a/src/components/editors/EditorButtons/index.tsx +++ b/src/components/editors/EditorButtons/index.tsx @@ -7,7 +7,7 @@ import { Padder } from '~/components/containers/Padder'; import { useNodeFormContext } from '~/utils/hooks/useNodeFormFormik'; const EditorButtons: FC = () => { - const { values, handleChange } = useNodeFormContext(); + const { values, handleChange, isSubmitting } = useNodeFormContext(); return ( @@ -20,12 +20,14 @@ const EditorButtons: FC = () => { handler={handleChange('title')} autoFocus maxLength={256} + disabled={isSubmitting} />