Disable access to feeds on PWI

This commit is contained in:
Paul Frazee
2023-12-12 18:56:15 -08:00
parent 8695fd97a4
commit 4394c4a934
5 changed files with 58 additions and 55 deletions
+6 -2
View File
@@ -182,7 +182,7 @@ function commonScreens(Stack: typeof HomeTab, unreadCountLabel?: string) {
<Stack.Screen
name="ProfileFeed"
getComponent={() => ProfileFeedScreen}
options={{title: title('Feed')}}
options={{title: title('Feed'), requireAuth: true}}
/>
<Stack.Screen
name="ProfileFeedLikedBy"
@@ -327,7 +327,11 @@ function FeedsTabNavigator() {
animationDuration: 250,
contentStyle,
}}>
<FeedsTab.Screen name="Feeds" getComponent={() => FeedsScreen} />
<FeedsTab.Screen
name="Feeds"
getComponent={() => FeedsScreen}
options={{requireAuth: true}}
/>
{commonScreens(FeedsTab as typeof HomeTab)}
</FeedsTab.Navigator>
)
+1 -1
View File
@@ -153,7 +153,7 @@ function ProfileScreenLoaded({
const isMe = profile.did === currentAccount?.did
const showRepliesTab = hasSession
const showLikesTab = isMe
const showFeedsTab = isMe || extraInfoQuery.data?.hasFeedgens
const showFeedsTab = hasSession && (isMe || extraInfoQuery.data?.hasFeedgens)
const showListsTab = hasSession && (isMe || extraInfoQuery.data?.hasLists)
const sectionTitles = useMemo<string[]>(() => {
return [
+3 -3
View File
@@ -138,6 +138,9 @@ export function BottomBar({navigation}: BottomTabBarProps) {
accessibilityLabel={_(msg`Search`)}
accessibilityHint=""
/>
{hasSession && (
<>
<Btn
testID="bottomBarFeedsBtn"
icon={
@@ -160,9 +163,6 @@ export function BottomBar({navigation}: BottomTabBarProps) {
accessibilityLabel={_(msg`Feeds`)}
accessibilityHint=""
/>
{hasSession && (
<>
<Btn
testID="bottomBarNotificationsBtn"
icon={
+3 -3
View File
@@ -64,6 +64,9 @@ export function BottomBarWeb() {
)
}}
</NavItem>
{hasSession && (
<>
<NavItem routeName="Feeds" href="/feeds">
{({isActive}) => {
return (
@@ -75,9 +78,6 @@ export function BottomBarWeb() {
)
}}
</NavItem>
{hasSession && (
<>
<NavItem routeName="Notifications" href="/notifications">
{({isActive}) => {
const Icon = isActive ? BellIconSolid : BellIcon
+2 -3
View File
@@ -314,6 +314,8 @@ export function DesktopLeftNav() {
}
label={_(msg`Search`)}
/>
{hasSession && (
<>
<NavItem
href="/feeds"
icon={
@@ -332,9 +334,6 @@ export function DesktopLeftNav() {
}
label={_(msg`Feeds`)}
/>
{hasSession && (
<>
<NavItem
href="/notifications"
count={numUnread}