Skip to content

Commit

Permalink
consistency with other uses
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius committed Dec 20, 2024
1 parent 2d8c41b commit d8bc780
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/view/com/util/post-embeds/QuoteEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,12 @@ export function QuoteX({onRemove}: {onRemove: () => void}) {
export function LazyQuoteEmbed({uri}: {uri: string}) {
const {data} = useResolveLinkQuery(uri)
const moderationOpts = useModerationOpts()
if (
!data ||
data.type !== 'record' ||
data.kind !== 'post' ||
!moderationOpts
) {
if (!data || data.type !== 'record' || data.kind !== 'post') {
return null
}
const moderation = moderatePost(data.view, moderationOpts)
const moderation = moderationOpts
? moderatePost(data.view, moderationOpts)
: undefined
return <QuoteEmbed quote={data.view} moderation={moderation} />
}

Expand Down

0 comments on commit d8bc780

Please sign in to comment.