landscape: move transcluded comments to new render

Fixes urbit/landscape#814
Fixes urbit/landscape#813
This commit is contained in:
Matilde Park 2021-04-23 15:39:21 -04:00
parent b78e7583db
commit 7ac71c64a3

View File

@ -4,6 +4,7 @@ import ChatMessage from "../chat/components/ChatMessage";
import { Association, GraphNode, Post, Group } from "@urbit/api"; import { Association, GraphNode, Post, Group } from "@urbit/api";
import { useGroupForAssoc } from "~/logic/state/group"; import { useGroupForAssoc } from "~/logic/state/group";
import { MentionText } from "~/views/components/MentionText"; import { MentionText } from "~/views/components/MentionText";
import { GraphContentWide } from '~/views/landscape/components/Graph/GraphContentWide';
import Author from "~/views/components/Author"; import Author from "~/views/components/Author";
import { NoteContent } from "../publish/components/Note"; import { NoteContent } from "../publish/components/Note";
import { PostContent } from "~/views/landscape/components/Home/Post/PostContent"; import { PostContent } from "~/views/landscape/components/Home/Post/PostContent";
@ -31,7 +32,7 @@ function TranscludedLinkNode(props: {
return <PermalinkEmbed transcluded={transcluded + 1} api={api} link={permalink} association={assoc} /> return <PermalinkEmbed transcluded={transcluded + 1} api={api} link={permalink} association={assoc} />
} }
return ( return (
<Box borderRadius="2" p="2" bg="scales.black05"> <Box borderRadius="2" p="2" bg="scales.black05">
<Anchor underline={false} target="_blank" color="black" href={link.url}> <Anchor underline={false} target="_blank" color="black" href={link.url}>
@ -74,11 +75,11 @@ function TranscludedComment(props: {
group={group} group={group}
/> />
<Box p="2"> <Box p="2">
<MentionText <GraphContentWide
api={api} api={api}
transcluded={transcluded} transcluded={transcluded}
content={comment.post.contents} post={comment.post}
group={group} showOurContact={false}
/> />
</Box> </Box>
</Col> </Col>
@ -200,8 +201,8 @@ export function TranscludedNode(props: {
<TranscludedPost <TranscludedPost
api={props.api} api={props.api}
post={node.post} post={node.post}
group={group} group={group}
transcluded={transcluded} transcluded={transcluded}
/>) />)
; ;
default: default: