Improve web titles
This commit is contained in:
parent
5a20e0fafa
commit
d88c27a419
2 changed files with 5 additions and 6 deletions
|
@ -150,16 +150,12 @@ function commonScreens(Stack: typeof HomeTab, unreadCountLabel?: string) {
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="CustomFeed"
|
name="CustomFeed"
|
||||||
component={CustomFeedScreen}
|
component={CustomFeedScreen}
|
||||||
options={({route}) => ({
|
options={{title: title('Feed')}}
|
||||||
title: title(`Custom feed by @${route.params.name}`),
|
|
||||||
})}
|
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="CustomFeedLikedBy"
|
name="CustomFeedLikedBy"
|
||||||
component={CustomFeedLikedByScreen}
|
component={CustomFeedLikedByScreen}
|
||||||
options={({route}) => ({
|
options={{title: title('Liked by')}}
|
||||||
title: title(`Custom feed by @${route.params.name}`),
|
|
||||||
})}
|
|
||||||
/>
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="Debug"
|
name="Debug"
|
||||||
|
|
|
@ -20,6 +20,7 @@ import {Button} from 'view/com/util/forms/Button'
|
||||||
import {Text} from 'view/com/util/text/Text'
|
import {Text} from 'view/com/util/text/Text'
|
||||||
import * as Toast from 'view/com/util/Toast'
|
import * as Toast from 'view/com/util/Toast'
|
||||||
import {isDesktopWeb} from 'platform/detection'
|
import {isDesktopWeb} from 'platform/detection'
|
||||||
|
import {useSetTitle} from 'lib/hooks/useSetTitle'
|
||||||
|
|
||||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'CustomFeed'>
|
type Props = NativeStackScreenProps<CommonNavigatorParams, 'CustomFeed'>
|
||||||
export const CustomFeedScreen = withAuthRequired(
|
export const CustomFeedScreen = withAuthRequired(
|
||||||
|
@ -41,6 +42,8 @@ export const CustomFeedScreen = withAuthRequired(
|
||||||
return feed
|
return feed
|
||||||
}, [store, uri])
|
}, [store, uri])
|
||||||
|
|
||||||
|
useSetTitle(currentFeed?.displayName)
|
||||||
|
|
||||||
const onToggleSaved = React.useCallback(async () => {
|
const onToggleSaved = React.useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
if (currentFeed?.isSaved) {
|
if (currentFeed?.isSaved) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue