diff options
author | Frudrax Cheng <i@cynosura.one> | 2024-06-18 09:11:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 09:11:53 +0800 |
commit | 7548c23f19d0cf8e9230fa75ad5d1d73fe471a7d (patch) | |
tree | 3433af3806f1e89f5d917bd92086dd9ab63355df /src/components | |
parent | b4e4c15fbbf1fc1ef2001ee78f70c461b39b1dc4 (diff) | |
parent | 077da0830924d4c040ef095d8349f13fdfdf4372 (diff) | |
download | voidsky-7548c23f19d0cf8e9230fa75ad5d1d73fe471a7d.tar.zst |
Merge branch 'bluesky-social:main' into zh
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/FeedCard.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/FeedCard.tsx b/src/components/FeedCard.tsx index 2745ed7c9..94d97cb62 100644 --- a/src/components/FeedCard.tsx +++ b/src/components/FeedCard.tsx @@ -11,6 +11,7 @@ import { useRemoveFeedMutation, } from '#/state/queries/preferences' import {sanitizeHandle} from 'lib/strings/handles' +import {useSession} from 'state/session' import {UserAvatar} from '#/view/com/util/UserAvatar' import * as Toast from 'view/com/util/Toast' import {useTheme} from '#/alf' @@ -116,6 +117,12 @@ export function Likes({count}: {count: number}) { } export function Action({uri, pin}: {uri: string; pin?: boolean}) { + const {hasSession} = useSession() + if (!hasSession) return null + return <ActionInner uri={uri} pin={pin} /> +} + +function ActionInner({uri, pin}: {uri: string; pin?: boolean}) { const {_} = useLingui() const {data: preferences} = usePreferencesQuery() const {isPending: isAddSavedFeedPending, mutateAsync: saveFeeds} = |