import { useDeferRoute } from "@defer/client/next"
import createThumbnails from "../defer/createThumbnails"

const [
    uploadFile,
    { loading, result: fileName, error }
] = useDeferRoute<typeof createThumbnails>(
    "/api/upload",
    { refreshInterval: 1000 }
);