diff --git a/apps/comments-ui/src/components/content/forms/Form.tsx b/apps/comments-ui/src/components/content/forms/Form.tsx index 5dcd4f15ac..ddcb5e61f4 100644 --- a/apps/comments-ui/src/components/content/forms/Form.tsx +++ b/apps/comments-ui/src/components/content/forms/Form.tsx @@ -8,7 +8,7 @@ import {Transition} from '@headlessui/react'; import {useCallback, useEffect, useRef, useState} from 'react'; import {usePopupOpen} from '../../../utils/hooks'; -type Progress = 'default' | 'sending' | 'sent' | 'error' +type Progress = 'default' | 'sending' | 'sent' | 'error'; export type SubmitSize = 'small' | 'medium' | 'large'; type FormEditorProps = { submit: (data: {html: string}) => Promise; diff --git a/apps/comments-ui/src/components/content/forms/SecundaryForm.tsx b/apps/comments-ui/src/components/content/forms/SecundaryForm.tsx index 6a5cb29bf7..3f3453b8f8 100644 --- a/apps/comments-ui/src/components/content/forms/SecundaryForm.tsx +++ b/apps/comments-ui/src/components/content/forms/SecundaryForm.tsx @@ -11,7 +11,7 @@ type Props = { close: () => void; closeIfNotChanged: () => void; submitText: JSX.Element; - submitSize: SubmitSize + submitSize: SubmitSize; }; const SecundaryForm: React.FC = ({editor, submit, close, closeIfNotChanged, submitText, submitSize}) => { const {dispatchAction, secundaryFormCount} = useAppContext(); @@ -19,7 +19,6 @@ const SecundaryForm: React.FC = ({editor, submit, close, closeIfNotChange // Keep track of the amount of open forms useEffect(() => { dispatchAction('increaseSecundaryFormCount', {}); - return () => { dispatchAction('decreaseSecundaryFormCount', {}); }; @@ -33,7 +32,7 @@ const SecundaryForm: React.FC = ({editor, submit, close, closeIfNotChange if (secundaryFormCount > 1) { closeIfNotChanged(); - } + }; }, [secundaryFormCount]); const reduced = isMobile();