import { getProjects } from '../../utils/projects'; import { useRouter } from 'next/router'; import { Wrapper } from '../../styles/projects'; import Card from '../../components/Card'; import IconButton from '../../components/IconButton'; import Head from 'next/head'; interface Props { projects: { title: string; description: string; image?: string; slug: string; date: string; tags?: string[]; }[]; } const Index = ({ projects }: Props) => { const router = useRouter(); return ( <> Projects | Hazem Krimi
router.back()}> Back

Projects

{projects.length !== 0 ? ( projects.map(({ slug, ...rest }) => ( )) ) : (

Nothing for now

)}
); }; export default Index; export const getStaticProps = async () => { const projects = getProjects(); return { props: { projects } }; };