import { ListProjects } from "@/api/projects"; import { PrimaryButton } from "@/components/Button"; import MainLayout from "@/components/MainLayout"; import Table from "@/components/table"; import Link from "next/link"; import { useRouter } from "next/router"; import { useEffect, useState } from "react"; const ProjectsHomePage = () => { const router = useRouter(); const [projects, setProjects] = useState([]); useEffect(() => { ListProjects(setProjects); }, []); return (

Projects

router.push("/projects/create")} />
{projects.data !== undefined && ( { return { name: ( {project.name} ), id: project.id, }; })} /> )} ); }; export default ProjectsHomePage;