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/screens/ProfileFeed.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/view/screens/ProfileFeed.tsx') diff --git a/src/view/screens/ProfileFeed.tsx b/src/view/screens/ProfileFeed.tsx index 537fe7362..f62790be6 100644 --- a/src/view/screens/ProfileFeed.tsx +++ b/src/view/screens/ProfileFeed.tsx @@ -16,7 +16,6 @@ import {CommonNavigatorParams} from 'lib/routes/types' import {makeRecordUri} from 'lib/strings/url-helpers' import {colors, s} from 'lib/styles' import {observer} from 'mobx-react-lite' -import {useStores} from 'state/index' import {FeedDescriptor} from '#/state/queries/post-feed' import {withAuthRequired} from 'view/com/auth/withAuthRequired' import {PagerWithHeader} from 'view/com/pager/PagerWithHeader' @@ -62,6 +61,7 @@ import { } from '#/state/queries/preferences' import {useSession} from '#/state/session' import {useLikeMutation, useUnlikeMutation} from '#/state/queries/like' +import {useComposerControls} from '#/state/shell/composer' const SECTION_TITLES = ['Posts', 'About'] @@ -163,9 +163,9 @@ export const ProfileFeedScreenInner = function ProfileFeedScreenInnerImpl({ }) { const {_} = useLingui() const pal = usePalette('default') - const store = useStores() const {currentAccount} = useSession() const {openModal} = useModalControls() + const {openComposer} = useComposerControls() const {track} = useAnalytics() const feedSectionRef = React.useRef(null) @@ -420,7 +420,7 @@ export const ProfileFeedScreenInner = function ProfileFeedScreenInnerImpl({ store.shell.openComposer({})} + onPress={() => openComposer({})} icon={ } -- cgit 1.4.1