import { ContentImage } from "./Image"; import { Link } from "react-router-dom"; import { MoodReadResponse, PostReadResponse } from "@newstackdev/iosdk-newgraph-client-js"; import { NLView } from "../types"; import { useAppState } from "../overmind"; import { useCachedPost } from "../hooks/useCached"; export const MaybeLink: React.FC< React.PropsWithChildren<{ style?: React.CSSProperties; to: string; className?: string; }> > = ({ to, children, className, style }) => ( {children} ); export const PostWidget: NLView<{ post: PostReadResponse; mood?: MoodReadResponse; username?: string; aspectRatio: string | undefined | number; isSpotlight?: boolean; }> = ({ post, mood, username, aspectRatio, isSpotlight }) => { const p = post; return ( <> {p.contentType === "text/plain" ? (

"{/* @ts-ignore */} {p.content?.length > 17 ? p?.content?.substring(0, 12) + "..." : p.content || ""}"

) : ( = 1 ? "post-rounded" : "post-rounded"} /> )} {/* {username && (

{post?.author?.username || post?.author?.displayName}

)} */} ); // return {p.title}} // cover={} // > // {/* */} // By { p.author?.username } // // { post.description } // // {/* */} // };