diff --git a/src/screens/Post/PostLikedBy.tsx b/src/screens/Post/PostLikedBy.tsx index d35d332432..6838186900 100644 --- a/src/screens/Post/PostLikedBy.tsx +++ b/src/screens/Post/PostLikedBy.tsx @@ -1,13 +1,12 @@ import React from 'react' -import {msg} from '@lingui/macro' -import {useLingui} from '@lingui/react' +import {Plural, Trans} from '@lingui/macro' import {useFocusEffect} from '@react-navigation/native' import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types' import {makeRecordUri} from '#/lib/strings/url-helpers' +import {usePostThreadQuery} from '#/state/queries/post-thread' import {useSetMinimalShellMode} from '#/state/shell' import {PostLikedBy as PostLikedByComponent} from '#/view/com/post-thread/PostLikedBy' -import {ViewHeader} from '#/view/com/util/ViewHeader' import * as Layout from '#/components/Layout' type Props = NativeStackScreenProps @@ -15,7 +14,12 @@ export const PostLikedByScreen = ({route}: Props) => { const setMinimalShellMode = useSetMinimalShellMode() const {name, rkey} = route.params const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey) - const {_} = useLingui() + const {data: post} = usePostThreadQuery(uri) + + let likeCount + if (post?.thread.type === 'post') { + likeCount = post.thread.post.likeCount + } useFocusEffect( React.useCallback(() => { @@ -25,7 +29,22 @@ export const PostLikedByScreen = ({route}: Props) => { return ( - + + + + {post && ( + <> + + Liked By + + + + + + )} + + + )