diff --git a/src/features/compose/components/compose-form.tsx b/src/features/compose/components/compose-form.tsx index c8dde1ef2..cac2faaac 100644 --- a/src/features/compose/components/compose-form.tsx +++ b/src/features/compose/components/compose-form.tsx @@ -29,6 +29,7 @@ import { useCompose } from 'soapbox/hooks/useCompose.ts'; import { useDraggedFiles } from 'soapbox/hooks/useDraggedFiles.ts'; import { useFeatures } from 'soapbox/hooks/useFeatures.ts'; import { useInstance } from 'soapbox/hooks/useInstance.ts'; +import { useOwnAccount } from 'soapbox/hooks/useOwnAccount.ts'; import { usePrevious } from 'soapbox/hooks/usePrevious.ts'; import QuotedStatusContainer from '../containers/quoted-status-container.tsx'; @@ -77,6 +78,9 @@ interface IComposeForm { } const ComposeForm = ({ id, shouldCondense, autoFocus, clickableAreaRef, event, group, extra, streak }: IComposeForm) => { + const { account } = useOwnAccount(); + const userStreak = streak ?? account?.ditto.streak.days; + const history = useHistory(); const intl = useIntl(); const dispatch = useAppDispatch(); @@ -158,7 +162,7 @@ const ComposeForm = ({ id, shouldCondense, autoFocus, clickab dispatch(changeCompose(id, text)); dispatch(submitCompose(id, { history })); - if (streak === 0 && features.streak) { + if (userStreak === 0 && features.streak) { dispatch(openModal('STREAK')); }