Change publish btn action
This commit is contained in:
parent
b3e3068a8d
commit
88ecd906f9
|
@ -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) => {
|
|||
<div class={clsx(styles.actionsHolder, styles.scrolled, { hidden: isShortcutsVisible() })}>
|
||||
<section>
|
||||
<p>
|
||||
<span class={styles.link} onClick={handlePublishClick}>
|
||||
<span class={styles.link} onClick={() => publishShout(form)}>
|
||||
{t('Publish')}
|
||||
</span>
|
||||
</p>
|
||||
|
|
|
@ -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),
|
||||
})}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user