import { useNavigate } from "@solidjs/router"; import { For, JSXElement, Show, createSignal } from "solid-js"; import { Arrow, loadSpinner } from "../Util/Icons"; import { Post, getPosts } from "../Util/api"; export function Posts(): JSXElement { const [posts, setPosts] = createSignal([] as Post[]); const [loading, setLoading] = createSignal(true); getPosts().then((posts) => { setPosts(posts); setLoading(false); }); return ( {(post): JSXElement => } ); } // This is the card container for a post export function PostSegment(props: { post: Post }): JSXElement { const nav = useNavigate(); return (

{props.post?.content}

); }