diff options
Diffstat (limited to 'src/view/shell/desktop/RightNav.tsx')
-rw-r--r-- | src/view/shell/desktop/RightNav.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx index a4b3e5746..98f54c7ed 100644 --- a/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx @@ -14,11 +14,12 @@ import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' import {pluralize} from 'lib/strings/helpers' import {formatCount} from 'view/com/util/numeric/format' import {useModalControls} from '#/state/modals' +import {useSession} from '#/state/session' export const DesktopRightNav = observer(function DesktopRightNavImpl() { - const store = useStores() const pal = usePalette('default') const palError = usePalette('error') + const {isSandbox, hasSession, currentAccount} = useSession() const {isTablet} = useWebMediaQueries() if (isTablet) { @@ -27,10 +28,10 @@ export const DesktopRightNav = observer(function DesktopRightNavImpl() { return ( <View style={[styles.rightNav, pal.view]}> - {store.session.hasSession && <DesktopSearch />} - {store.session.hasSession && <DesktopFeeds />} + {hasSession && <DesktopSearch />} + {hasSession && <DesktopFeeds />} <View style={styles.message}> - {store.session.isSandbox ? ( + {isSandbox ? ( <View style={[palError.view, styles.messageLine, s.p10]}> <Text type="md" style={[palError.text, s.bold]}> SANDBOX. Posts and accounts are not permanent. @@ -42,8 +43,8 @@ export const DesktopRightNav = observer(function DesktopRightNavImpl() { type="md" style={pal.link} href={FEEDBACK_FORM_URL({ - email: store.session.currentSession?.email, - handle: store.session.currentSession?.handle, + email: currentAccount!.email, + handle: currentAccount!.handle, })} text="Send feedback" /> |