import type { Comment } from "@/types"; export async function getComments(): Promise { const response = await fetch("/api/comments"); return await response.json(); } export async function postComment(content: string): Promise { await fetch("/api/comments", { method: "POST", body: JSON.stringify({ content }), headers: { "Content-Type": "application/json" }, }); }