about summary refs log tree commit diff
path: root/src/view/com/feeds
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-11-22 16:53:11 -0600
committerGitHub <noreply@github.com>2023-11-22 16:53:11 -0600
commit95f8bd8ddb356ce982b31eabb2dcf9f08ba40b9b (patch)
treec25793eac2ee221ce6b431201c0d4362384c7297 /src/view/com/feeds
parent08333002cc4589c225c8fb82112d7059c334bfeb (diff)
downloadvoidsky-95f8bd8ddb356ce982b31eabb2dcf9f08ba40b9b.tar.zst
[PWI] Misc (#1977)
* PostDropdownBtn

* Hide reply prompt

* Hide FABs
Diffstat (limited to 'src/view/com/feeds')
-rw-r--r--src/view/com/feeds/FeedPage.tsx60
1 files changed, 37 insertions, 23 deletions
diff --git a/src/view/com/feeds/FeedPage.tsx b/src/view/com/feeds/FeedPage.tsx
index e7dcf09b8..535306afb 100644
--- a/src/view/com/feeds/FeedPage.tsx
+++ b/src/view/com/feeds/FeedPage.tsx
@@ -41,7 +41,7 @@ export function FeedPage({
   renderEmptyState: () => JSX.Element
   renderEndOfFeed?: () => JSX.Element
 }) {
-  const {isSandbox} = useSession()
+  const {isSandbox, hasSession} = useSession()
   const pal = usePalette('default')
   const {_} = useLingui()
   const {isDesktop} = useWebMediaQueries()
@@ -123,24 +123,35 @@ export function FeedPage({
             }
             onPress={emitSoftReset}
           />
-          <TextLink
-            type="title-lg"
-            href="/settings/home-feed"
-            style={{fontWeight: 'bold'}}
-            accessibilityLabel={_(msg`Feed Preferences`)}
-            accessibilityHint=""
-            text={
-              <FontAwesomeIcon
-                icon="sliders"
-                style={pal.textLight as FontAwesomeIconStyle}
-              />
-            }
-          />
+          {hasSession && (
+            <TextLink
+              type="title-lg"
+              href="/settings/home-feed"
+              style={{fontWeight: 'bold'}}
+              accessibilityLabel={_(msg`Feed Preferences`)}
+              accessibilityHint=""
+              text={
+                <FontAwesomeIcon
+                  icon="sliders"
+                  style={pal.textLight as FontAwesomeIconStyle}
+                />
+              }
+            />
+          )}
         </View>
       )
     }
     return <></>
-  }, [isDesktop, pal.view, pal.text, pal.textLight, hasNew, _, isSandbox])
+  }, [
+    isDesktop,
+    pal.view,
+    pal.text,
+    pal.textLight,
+    hasNew,
+    _,
+    isSandbox,
+    hasSession,
+  ])
 
   return (
     <View testID={testID} style={s.h100pct}>
@@ -166,14 +177,17 @@ export function FeedPage({
           showIndicator={hasNew}
         />
       )}
-      <FAB
-        testID="composeFAB"
-        onPress={onPressCompose}
-        icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
-        accessibilityRole="button"
-        accessibilityLabel={_(msg`New post`)}
-        accessibilityHint=""
-      />
+
+      {hasSession && (
+        <FAB
+          testID="composeFAB"
+          onPress={onPressCompose}
+          icon={<ComposeIcon2 strokeWidth={1.5} size={29} style={s.white} />}
+          accessibilityRole="button"
+          accessibilityLabel={_(msg`New post`)}
+          accessibilityHint=""
+        />
+      )}
     </View>
   )
 }