Fix type errors

This commit is contained in:
Grace Kind
2025-07-24 15:59:49 -05:00
parent 4fd19309a4
commit 113137b030
4 changed files with 7 additions and 4 deletions
@@ -178,7 +178,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
const {_, i18n} = useLingui() const {_, i18n} = useLingui()
const {openComposer} = useOpenComposer() const {openComposer} = useOpenComposer()
const {currentAccount, hasSession} = useSession() const {currentAccount, hasSession} = useSession()
const feedFeedback = useFeedFeedback(postSource?.feedInfo, hasSession) const feedFeedback = useFeedFeedback(postSource?.feedSourceInfo, hasSession)
const post = postShadow const post = postShadow
const record = item.value.post.record const record = item.value.post.record
+1 -1
View File
@@ -59,7 +59,7 @@ export function useFeedFeedback(
const agent = useAgent() const agent = useAgent()
const feedInfo = feed ? buildFeedInfo(feed) : null const feedInfo = feed ? buildFeedInfo(feed) : null
const enabled = feedInfo && feedInfo.acceptsInteractions && hasSession const enabled = !!feedInfo && feedInfo.acceptsInteractions && hasSession
const enabledInteractions = useMemo(() => { const enabledInteractions = useMemo(() => {
if (!enabled) { if (!enabled) {
+1 -1
View File
@@ -48,7 +48,7 @@ export type FeedSourceFeedInfo = {
creatorDid: string creatorDid: string
creatorHandle: string creatorHandle: string
likeCount: number | undefined likeCount: number | undefined
acceptsInteractions: boolean | undefined acceptsInteractions?: boolean
likeUri: string | undefined likeUri: string | undefined
contentMode: AppBskyFeedDefs.GeneratorView['contentMode'] contentMode: AppBskyFeedDefs.GeneratorView['contentMode']
} }
+4 -1
View File
@@ -216,7 +216,10 @@ let PostThreadItemLoaded = ({
anchorPostSource?: PostSource anchorPostSource?: PostSource
}): React.ReactNode => { }): React.ReactNode => {
const {currentAccount, hasSession} = useSession() const {currentAccount, hasSession} = useSession()
const feedFeedback = useFeedFeedback(anchorPostSource?.feedInfo, hasSession) const feedFeedback = useFeedFeedback(
anchorPostSource?.feedSourceInfo,
hasSession,
)
const t = useTheme() const t = useTheme()
const pal = usePalette('default') const pal = usePalette('default')