diff options
author | LW <git@llllvvuu.dev> | 2023-05-17 07:50:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 09:50:28 -0500 |
commit | 41f3a0551511c7141aa416efe92130c4bf020214 (patch) | |
tree | 5f50d9e33373ca1f05ad5d10209693864ccf76fa /src/Navigation.tsx | |
parent | 656baa723913951e2a2961f00f0e5219660d0885 (diff) | |
download | voidsky-41f3a0551511c7141aa416efe92130c4bf020214.tar.zst |
I just realized how `mobx` works (never used before lol) and now I feel dumb.
Diffstat (limited to 'src/Navigation.tsx')
-rw-r--r-- | src/Navigation.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 17bb3c159..09631701f 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -28,7 +28,6 @@ import {isNative} from 'platform/detection' import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' import {router} from './routes' import {usePalette} from 'lib/hooks/usePalette' -import {useUnreadCountLabel} from 'lib/hooks/useUnreadCountLabel' import {useStores} from './state' import {HomeScreen} from './view/screens/Home' @@ -296,9 +295,9 @@ const MyProfileTabNavigator = observer(() => { * The FlatNavigator is used by Web to represent the routes * in a single ("flat") stack. */ -function FlatNavigator() { +const FlatNavigator = observer(() => { const pal = usePalette('default') - const unreadCountLabel = useUnreadCountLabel() + const unreadCountLabel = useStores().me.notifications.unreadCountLabel const title = (page: string) => bskyTitle(page, unreadCountLabel) return ( <Flat.Navigator @@ -327,7 +326,7 @@ function FlatNavigator() { {commonScreens(Flat as typeof HomeTab, unreadCountLabel)} </Flat.Navigator> ) -} +}) /** * The RoutesContainer should wrap all components which need access |