diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-05-17 23:36:36 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-05-17 23:36:36 -0500 |
commit | d88c27a41995c181a38c01248fe01f853ba83366 (patch) | |
tree | 69098fefee81360e6a71424c02d9486e1536b5b9 | |
parent | 5a20e0fafa2bdbfd57a69da42448a687c7d812c1 (diff) | |
download | voidsky-d88c27a41995c181a38c01248fe01f853ba83366.tar.zst |
Improve web titles
-rw-r--r-- | src/Navigation.tsx | 8 | ||||
-rw-r--r-- | src/view/screens/CustomFeed.tsx | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 46189c5f0..ff7a5f5c2 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -150,16 +150,12 @@ function commonScreens(Stack: typeof HomeTab, unreadCountLabel?: string) { <Stack.Screen name="CustomFeed" component={CustomFeedScreen} - options={({route}) => ({ - title: title(`Custom feed by @${route.params.name}`), - })} + options={{title: title('Feed')}} /> <Stack.Screen name="CustomFeedLikedBy" component={CustomFeedLikedByScreen} - options={({route}) => ({ - title: title(`Custom feed by @${route.params.name}`), - })} + options={{title: title('Liked by')}} /> <Stack.Screen name="Debug" diff --git a/src/view/screens/CustomFeed.tsx b/src/view/screens/CustomFeed.tsx index 9f7f81691..76b26dcf7 100644 --- a/src/view/screens/CustomFeed.tsx +++ b/src/view/screens/CustomFeed.tsx @@ -20,6 +20,7 @@ import {Button} from 'view/com/util/forms/Button' import {Text} from 'view/com/util/text/Text' import * as Toast from 'view/com/util/Toast' import {isDesktopWeb} from 'platform/detection' +import {useSetTitle} from 'lib/hooks/useSetTitle' type Props = NativeStackScreenProps<CommonNavigatorParams, 'CustomFeed'> export const CustomFeedScreen = withAuthRequired( @@ -41,6 +42,8 @@ export const CustomFeedScreen = withAuthRequired( return feed }, [store, uri]) + useSetTitle(currentFeed?.displayName) + const onToggleSaved = React.useCallback(async () => { try { if (currentFeed?.isSaved) { |