fix double quote posts
This commit is contained in:
committed by
Eric Bailey
parent
c6c9c45819
commit
75ff59e438
@@ -94,14 +94,13 @@ export function Post({
|
||||
{rt && <RichText value={rt} />}
|
||||
|
||||
{post.embed && (
|
||||
<Box cx={[a.pt_sm]}>
|
||||
<PostEmbed
|
||||
embed={post.embed}
|
||||
data={data}
|
||||
moderation={moderation}
|
||||
moderatorData={moderatorData}
|
||||
/>
|
||||
</Box>
|
||||
<PostEmbed
|
||||
embed={post.embed}
|
||||
data={data}
|
||||
moderation={moderation}
|
||||
moderatorData={moderatorData}
|
||||
cx={[a.pt_sm]}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Box cx={[a.flex_row, a.align_center, a.justify_between, a.pt_md]}>
|
||||
|
||||
@@ -33,9 +33,11 @@ type CommonProps = {
|
||||
|
||||
export function PostEmbed({
|
||||
embed: rawEmbed,
|
||||
cx,
|
||||
...rest
|
||||
}: CommonProps & {
|
||||
embed: AppBskyFeedDefs.PostView['embed']
|
||||
cx?: (Record<string, any> | undefined)[]
|
||||
}) {
|
||||
const embed = parseEmbed(rawEmbed)
|
||||
|
||||
@@ -43,7 +45,11 @@ export function PostEmbed({
|
||||
case 'images':
|
||||
case 'link':
|
||||
case 'video':
|
||||
return <MediaEmbeds embed={embed} {...rest} />
|
||||
return (
|
||||
<Box cx={cx}>
|
||||
<MediaEmbeds embed={embed} {...rest} />
|
||||
</Box>
|
||||
)
|
||||
case 'feed':
|
||||
case 'list':
|
||||
case 'starter_pack':
|
||||
@@ -51,10 +57,14 @@ export function PostEmbed({
|
||||
case 'post_blocked':
|
||||
case 'post_detached':
|
||||
case 'post_not_found':
|
||||
return <RecordEmbeds embed={embed} {...rest} />
|
||||
return rest.hideNestedEmbeds ? null : (
|
||||
<Box cx={cx}>
|
||||
<RecordEmbeds embed={embed} {...rest} />
|
||||
</Box>
|
||||
)
|
||||
case 'post_with_media':
|
||||
return (
|
||||
<Box cx={[a.gap_md]}>
|
||||
<Box cx={[a.gap_md, ...cx]}>
|
||||
<MediaEmbeds embed={embed.media} {...rest} />
|
||||
{!rest.hideNestedEmbeds && (
|
||||
<RecordEmbeds embed={embed.view} {...rest} hideNestedEmbeds />
|
||||
|
||||
@@ -64,7 +64,7 @@ export function QuotePost({
|
||||
cx={[
|
||||
a.flex_row,
|
||||
a.align_center,
|
||||
a.gap_sm,
|
||||
{gap: 6},
|
||||
a.pb_sm,
|
||||
a.w_full,
|
||||
a.overflow_hidden,
|
||||
@@ -88,15 +88,14 @@ export function QuotePost({
|
||||
{rt && <RichText value={rt} cx={[a.text_sm]} />}
|
||||
|
||||
{embeds && embeds.length && (
|
||||
<Box cx={[a.pt_sm]}>
|
||||
<PostEmbed
|
||||
embed={embeds[0]}
|
||||
data={data}
|
||||
moderation={moderation}
|
||||
moderatorData={moderatorData}
|
||||
hideNestedEmbeds
|
||||
/>
|
||||
</Box>
|
||||
<PostEmbed
|
||||
embed={embeds[0]}
|
||||
data={data}
|
||||
moderation={moderation}
|
||||
moderatorData={moderatorData}
|
||||
hideNestedEmbeds
|
||||
cx={[a.pt_sm]}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user