about summary refs log tree commit diff
path: root/src/view/shell/desktop/LeftNav.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-03-13 23:30:12 -0500
committerPaul Frazee <pfrazee@gmail.com>2023-03-13 23:30:12 -0500
commit774fb8371905473b88b26c350818aa6b4bf1bac2 (patch)
treeceee7f24ce3696b8890ef7bb3eb42bb04ba1078e /src/view/shell/desktop/LeftNav.tsx
parentb5c64a03b6cf91fb1699d2e87d3fded43a5dbb46 (diff)
downloadvoidsky-774fb8371905473b88b26c350818aa6b4bf1bac2.tar.zst
Rework logged out state to preserve routing and work for web
Diffstat (limited to 'src/view/shell/desktop/LeftNav.tsx')
-rw-r--r--src/view/shell/desktop/LeftNav.tsx22
1 files changed, 12 insertions, 10 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>
   )
 })