diff --git a/src/components/Editor/Panel/Panel.tsx b/src/components/Editor/Panel/Panel.tsx index c6503473..1a391a5f 100644 --- a/src/components/Editor/Panel/Panel.tsx +++ b/src/components/Editor/Panel/Panel.tsx @@ -47,11 +47,6 @@ export const Panel = (props: Props) => { const handleSaveClick = () => { saveShout(form) } - const { showSnackbar } = useSnackbar() - const handlePublishClick = () => { - if (form.mainTopic) publishShout(form) - else showSnackbar({ body: t('Please, set the main topic first') }) - } const html = useEditorHTML(() => editorRef.current()) @@ -74,7 +69,7 @@ export const Panel = (props: Props) => {
- + publishShout(form)}> {t('Publish')}
diff --git a/src/components/Nav/HeaderAuth.tsx b/src/components/Nav/HeaderAuth.tsx index 1d7851ab..31a0acc6 100644 --- a/src/components/Nav/HeaderAuth.tsx +++ b/src/components/Nav/HeaderAuth.tsx @@ -63,11 +63,6 @@ export const HeaderAuth = (props: Props) => { const handleSaveButtonClick = () => { saveShout(form) } - const { showSnackbar } = useSnackbar() - const handlePublishButtonClick = () => { - if (form.mainTopic) publishShout(form) - else showSnackbar({ body: t('Please, set the main topic first') }) - } const [width, setWidth] = createSignal(0) @@ -160,7 +155,7 @@ export const HeaderAuth = (props: Props) => { {renderIconedButton({ value: t('Publish'), icon: 'publish', - action: handlePublishButtonClick, + action: () => publishShout(form), })}