diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-14 10:41:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 10:41:55 -0800 |
commit | 0a26e78dcbbf48dad5daae73b210e236d706b22c (patch) | |
tree | c06c737ed49e8294bf5cbec1a75c36b591cb6669 /src/view/screens/Feeds.tsx | |
parent | c687172de96bd6aa85d3aa025c2e0f024640f345 (diff) | |
download | voidsky-0a26e78dcbbf48dad5daae73b210e236d706b22c.tar.zst |
Composer update (react-query refactor) (#1899)
* Move composer state to a context * Rework composer to use RQ --------- Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/view/screens/Feeds.tsx')
-rw-r--r-- | src/view/screens/Feeds.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/view/screens/Feeds.tsx b/src/view/screens/Feeds.tsx index 7a3daee8d..a6d47f5ce 100644 --- a/src/view/screens/Feeds.tsx +++ b/src/view/screens/Feeds.tsx @@ -8,7 +8,6 @@ import {FAB} from 'view/com/util/fab/FAB' import {Link} from 'view/com/util/Link' import {NativeStackScreenProps, FeedsTabNavigatorParams} from 'lib/routes/types' import {usePalette} from 'lib/hooks/usePalette' -import {useStores} from 'state/index' import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' import {ComposeIcon2, CogIcon} from 'lib/icons' import {s} from 'lib/styles' @@ -34,6 +33,7 @@ import { useSearchPopularFeedsMutation, } from '#/state/queries/feed' import {cleanError} from 'lib/strings/errors' +import {useComposerControls} from '#/state/shell/composer' type Props = NativeStackScreenProps<FeedsTabNavigatorParams, 'Feeds'> @@ -90,8 +90,8 @@ type FlatlistSlice = export const FeedsScreen = withAuthRequired(function FeedsScreenImpl( _props: Props, ) { - const store = useStores() const pal = usePalette('default') + const {openComposer} = useComposerControls() const {isMobile, isTabletOrDesktop} = useWebMediaQueries() const [query, setQuery] = React.useState('') const [isPTR, setIsPTR] = React.useState(false) @@ -128,8 +128,8 @@ export const FeedsScreen = withAuthRequired(function FeedsScreenImpl( [search], ) const onPressCompose = React.useCallback(() => { - store.shell.openComposer({}) - }, [store]) + openComposer({}) + }, [openComposer]) const onChangeQuery = React.useCallback( (text: string) => { setQuery(text) |