import { createSignal } from "solid-js"; import { getPosts } from "./api"; import { Post } from "./api"; import { useNavigate } from "@solidjs/router"; export function Posts() { const [posts, setPosts] = createSignal([] as Post[]); const [loading, setLoading] = createSignal(true); getPosts().then((posts) => { setPosts(posts as any); setLoading(false); }); return (
{post?.content}