import type { PostContent } from "./post"; import { Link } from "react-router"; export interface StaticPostProps { postContent: PostContent } // This is a version of Post without logic that just takes the content directly. // Doing this cuts down on loading time since we don't have to manually view every reply. export default function StaticPost({ postContent }: StaticPostProps) { let name = ""; if (postContent.author?.display_name) { name = postContent.author?.display_name } else { name = postContent.author?.name } console.debug(postContent.author?.name); return (
#{postContent.id}
{postContent.title}
{name}
Created at: {postContent.createdAt}
Parent: #{postContent.parentId}
{postContent.content}