Fix type errors
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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']
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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')
|
||||||
|
|||||||
Reference in New Issue
Block a user