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