import useSWR from "swr";
import type { Document } from "dbtype/api";
import { fetcher } from "./fetcher";

export function useGalleryDoc(id: string) {
    return useSWR<Document>(`/api/doc/${id}`, fetcher);
}