diff --git a/client-solid/src/Navbar.tsx b/client-solid/src/Navbar.tsx index 9902fda..ca5e4b8 100644 --- a/client-solid/src/Navbar.tsx +++ b/client-solid/src/Navbar.tsx @@ -32,7 +32,7 @@ export function Navbar() { return ( }> +
+ + + +
+ + ); +} diff --git a/client-solid/src/api.ts b/client-solid/src/api.ts index e858037..6b9660f 100644 --- a/client-solid/src/api.ts +++ b/client-solid/src/api.ts @@ -11,13 +11,12 @@ interface Votes { } export interface Post extends NewPost { - uuid: string; + id: string; createdAt: string; votes: Votes; } export async function getPosts(): Promise { -// const res = await fetch(`${API_URL}/posts`); const res = await fetch("/api/posts"); const data = await res.json(); return data; @@ -25,7 +24,9 @@ export async function getPosts(): Promise { export async function getPost(id: string): Promise { const res = await fetch(`/api/posts/${id}`); + console.log(res) const data = await res.json(); + console.log(data) return data; }