From 0a26e78dcbbf48dad5daae73b210e236d706b22c Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 14 Nov 2023 10:41:55 -0800 Subject: Composer update (react-query refactor) (#1899) * Move composer state to a context * Rework composer to use RQ --------- Co-authored-by: Eric Bailey --- src/view/shell/desktop/LeftNav.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/view/shell/desktop/LeftNav.tsx') diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index d7814cb5d..90cf144d2 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -44,6 +44,7 @@ import {Trans, msg} from '@lingui/macro' import {useProfileQuery} from '#/state/queries/profile' import {useSession} from '#/state/session' import {useUnreadNotifications} from '#/state/queries/notifications/unread' +import {useComposerControls} from '#/state/shell/composer' const ProfileCard = observer(function ProfileCardImpl() { const {currentAccount} = useSession() @@ -195,6 +196,7 @@ const NavItem = observer(function NavItemImpl({ function ComposeBtn() { const store = useStores() const {getState} = useNavigation() + const {openComposer} = useComposerControls() const {_} = useLingui() const {isTablet} = useWebMediaQueries() @@ -224,7 +226,7 @@ function ComposeBtn() { } const onPressCompose = async () => - store.shell.openComposer({mention: await getProfileHandle()}) + openComposer({mention: await getProfileHandle()}) if (isTablet) { return null -- cgit 1.4.1