import type { Book } from "@/types/book" export async function fetchBooks(): Promise { const response = await fetch("/api/books") if (!response.ok) { throw new Error("Failed to fetch books") } return response.json() }