import { useParams } from "@solidjs/router"; import { For, JSXElement, Show, Suspense, createResource } from "solid-js"; import { loadSpinner } from "../Util/Icons"; import { getComments, getPost } from "../Util/api"; import { PostSegment } from "./Posts"; export function SinglePost(): JSXElement { const params = useParams(); const [post] = createResource(params.postid, getPost); const [comments] = createResource(params.postid, () => getComments(params.postid, 0, 10) ); return ( {(comment) => ( // TODO: This should be a separate component

{comment.content}

)}
); }