import useSWR from "swr"; import { fetcher } from "../lib/fetcher"; import Layout from "../components/Layout"; import Container from "../components/Container"; import PageTitle from "../components/page/PageTitle"; import RepositoryGrid from "../components/projects/RepositoryGrid"; import Loading from "../components/loading/Loading"; import { ProjectsIcon } from "../components/icons"; function Grid() { // start fetching repos from API immediately const { data, error } = useSWR("/api/projects/?sort=top&limit=12", fetcher); if (error) { return