diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-03-19 15:18:29 +0000 |
---|---|---|
committer | Samuel Newman <mozzius@protonmail.com> | 2024-03-19 15:18:29 +0000 |
commit | f491bd89cc28cba46a92b443e1f07ff73e8f7128 (patch) | |
tree | 8f7c34372afe1f600a5626ef72dd9c8b28b930a6 /src/screens/Profile/ProfileLabelerLikedBy.tsx | |
parent | d2a11f3344149a299372f0a7dcd01de9f58ef9a1 (diff) | |
parent | 9c49b209ca9eda8e6fab0942f7046d335c955c1a (diff) | |
download | voidsky-f491bd89cc28cba46a92b443e1f07ff73e8f7128.tar.zst |
Merge remote-tracking branch 'origin/main' into samuel/alf-login
Diffstat (limited to 'src/screens/Profile/ProfileLabelerLikedBy.tsx')
-rw-r--r-- | src/screens/Profile/ProfileLabelerLikedBy.tsx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/screens/Profile/ProfileLabelerLikedBy.tsx b/src/screens/Profile/ProfileLabelerLikedBy.tsx new file mode 100644 index 000000000..1d2167520 --- /dev/null +++ b/src/screens/Profile/ProfileLabelerLikedBy.tsx @@ -0,0 +1,46 @@ +import React from 'react' +import {View} from 'react-native' +import {msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {useFocusEffect} from '@react-navigation/native' + +import {NativeStackScreenProps, CommonNavigatorParams} from '#/lib/routes/types' +import {ViewHeader} from '#/view/com/util/ViewHeader' +import {LikedByList} from '#/components/LikedByList' +import {useSetMinimalShellMode} from '#/state/shell' +import {makeRecordUri} from '#/lib/strings/url-helpers' + +import {atoms as a, useBreakpoints} from '#/alf' + +export function ProfileLabelerLikedByScreen({ + route, +}: NativeStackScreenProps<CommonNavigatorParams, 'ProfileLabelerLikedBy'>) { + const setMinimalShellMode = useSetMinimalShellMode() + const {name: handleOrDid} = route.params + const uri = makeRecordUri(handleOrDid, 'app.bsky.labeler.service', 'self') + const {_} = useLingui() + const {gtMobile} = useBreakpoints() + + useFocusEffect( + React.useCallback(() => { + setMinimalShellMode(false) + }, [setMinimalShellMode]), + ) + + return ( + <View + style={[ + a.mx_auto, + a.w_full, + a.h_full_vh, + gtMobile && [ + { + maxWidth: 600, + }, + ], + ]}> + <ViewHeader title={_(msg`Liked By`)} /> + <LikedByList uri={uri} /> + </View> + ) +} |