about summary refs log tree commit diff
path: root/src/view/shell
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/shell')
-rw-r--r--src/view/shell/desktop/LeftNav.tsx22
-rw-r--r--src/view/shell/desktop/RightNav.tsx4
-rw-r--r--src/view/shell/index.tsx15
-rw-r--r--src/view/shell/index.web.tsx12
4 files changed, 15 insertions, 38 deletions
diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx
index 46c77178b..65757b072 100644
--- a/src/view/shell/desktop/LeftNav.tsx
+++ b/src/view/shell/desktop/LeftNav.tsx
@@ -131,7 +131,7 @@ export const DesktopLeftNav = observer(function DesktopLeftNav() {
 
   return (
     <View style={styles.leftNav}>
-      <ProfileCard />
+      {store.session.hasSession && <ProfileCard />}
       <BackBtn />
       <NavItem
         href="/"
@@ -164,14 +164,16 @@ export const DesktopLeftNav = observer(function DesktopLeftNav() {
         }
         label="Notifications"
       />
-      <NavItem
-        href={`/profile/${store.me.handle}`}
-        icon={<UserIcon strokeWidth={1.75} size={28} style={pal.text} />}
-        iconFilled={
-          <UserIconSolid strokeWidth={1.75} size={28} style={pal.text} />
-        }
-        label="Profile"
-      />
+      {store.session.hasSession && (
+        <NavItem
+          href={`/profile/${store.me.handle}`}
+          icon={<UserIcon strokeWidth={1.75} size={28} style={pal.text} />}
+          iconFilled={
+            <UserIconSolid strokeWidth={1.75} size={28} style={pal.text} />
+          }
+          label="Profile"
+        />
+      )}
       <NavItem
         href="/settings"
         icon={<CogIcon strokeWidth={1.75} size={28} style={pal.text} />}
@@ -180,7 +182,7 @@ export const DesktopLeftNav = observer(function DesktopLeftNav() {
         }
         label="Settings"
       />
-      <ComposeBtn />
+      {store.session.hasSession && <ComposeBtn />}
     </View>
   )
 })
diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx
index 58fb31392..3f196cb70 100644
--- a/src/view/shell/desktop/RightNav.tsx
+++ b/src/view/shell/desktop/RightNav.tsx
@@ -7,12 +7,14 @@ import {Text} from 'view/com/util/text/Text'
 import {TextLink} from 'view/com/util/Link'
 import {FEEDBACK_FORM_URL} from 'lib/constants'
 import {s} from 'lib/styles'
+import {useStores} from 'state/index'
 
 export const DesktopRightNav = observer(function DesktopRightNav() {
+  const store = useStores()
   const pal = usePalette('default')
   return (
     <View style={[styles.rightNav, pal.view]}>
-      <DesktopSearch />
+      {store.session.hasSession && <DesktopSearch />}
       <View style={styles.message}>
         <Text type="md" style={[pal.textLight, styles.messageLine]}>
           Welcome to Bluesky! This is a beta application that's still in
diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx
index 116915ff4..15f9ef58c 100644
--- a/src/view/shell/index.tsx
+++ b/src/view/shell/index.tsx
@@ -5,7 +5,6 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context'
 import {Drawer} from 'react-native-drawer-layout'
 import {useNavigationState} from '@react-navigation/native'
 import {useStores} from 'state/index'
-import {Login} from 'view/screens/Login'
 import {ModalsContainer} from 'view/com/modals/Modal'
 import {Lightbox} from 'view/com/lightbox/Lightbox'
 import {Text} from 'view/com/util/text/Text'
@@ -104,20 +103,6 @@ export const Shell: React.FC = observer(() => {
     )
   }
 
-  if (!store.session.hasSession) {
-    return (
-      <View style={styles.outerContainer}>
-        <StatusBar
-          barStyle={
-            theme.colorScheme === 'dark' ? 'light-content' : 'dark-content'
-          }
-        />
-        <Login />
-        <ModalsContainer />
-      </View>
-    )
-  }
-
   return (
     <View testID="mobileShellView" style={[styles.outerContainer, pal.view]}>
       <StatusBar
diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx
index 9a97505e8..a588c99a1 100644
--- a/src/view/shell/index.web.tsx
+++ b/src/view/shell/index.web.tsx
@@ -4,7 +4,6 @@ import {View, StyleSheet} from 'react-native'
 import {useStores} from 'state/index'
 import {DesktopLeftNav} from './desktop/LeftNav'
 import {DesktopRightNav} from './desktop/RightNav'
-import {Login} from '../screens/Login'
 import {ErrorBoundary} from '../com/util/ErrorBoundary'
 import {Lightbox} from '../com/lightbox/Lightbox'
 import {ModalsContainer} from '../com/modals/Modal'
@@ -45,21 +44,10 @@ const ShellInner = observer(() => {
 
 export const Shell: React.FC = observer(() => {
   const pageBg = useColorSchemeStyle(styles.bgLight, styles.bgDark)
-  const store = useStores()
 
   if (isMobileWeb) {
     return <NoMobileWeb />
   }
-
-  if (!store.session.hasSession) {
-    return (
-      <View style={[s.hContentRegion, pageBg]}>
-        <Login />
-        <ModalsContainer />
-      </View>
-    )
-  }
-
   return (
     <View style={[s.hContentRegion, pageBg]}>
       <RoutesContainer>