import { Space } from "@/components/space"; import { SpaceIcon } from "@/components/space_icon"; import { fetchAllPages } from "@/utils"; import { SpaceProps } from "@/utils/type"; async function getSpaces() { try { const response = await fetchAllPages(); return response as SpaceProps[]; } catch { return []; } } export default async function Home() { const spaces = await getSpaces(); console.log(spaces); return (
Browse {spaces.length} spaces

Zero GPU Spaces

Discover spaces with zero GPU usage on 🤗 Hugging Face Spaces.

{spaces?.map((space: SpaceProps) => ( ))}
); }