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/ProfileList.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/view/screens/ProfileList.tsx') diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 42c3741db..594f4907d 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -28,7 +28,6 @@ import {LoadLatestBtn} from 'view/com/util/load-latest/LoadLatestBtn' import {FAB} from 'view/com/util/fab/FAB' import {Haptics} from 'lib/haptics' import {FeedDescriptor} from '#/state/queries/post-feed' -import {useStores} from 'state/index' import {usePalette} from 'lib/hooks/usePalette' import {useSetTitle} from 'lib/hooks/useSetTitle' import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' @@ -55,6 +54,7 @@ import { } from '#/state/queries/list' import {cleanError} from '#/lib/strings/errors' import {useSession} from '#/state/session' +import {useComposerControls} from '#/state/shell/composer' const SECTION_TITLES_CURATE = ['Posts', 'About'] const SECTION_TITLES_MOD = ['About'] @@ -106,9 +106,9 @@ function ProfileListScreenLoaded({ uri, list, }: Props & {uri: string; list: AppBskyGraphDefs.ListView}) { - const store = useStores() const {_} = useLingui() const queryClient = useQueryClient() + const {openComposer} = useComposerControls() const setMinimalShellMode = useSetMinimalShellMode() const {rkey} = route.params const feedSectionRef = React.useRef(null) @@ -191,7 +191,7 @@ function ProfileListScreenLoaded({ store.shell.openComposer({})} + onPress={() => openComposer({})} icon={ store.shell.openComposer({})} + onPress={() => openComposer({})} icon={ } -- cgit 1.4.1