import { FC } from 'react'; import { getPortfolioProjects } from '../utils/portfolio'; import { getBlogPosts } from '../utils/blog'; import { GetStaticProps } from 'next'; import { Wrapper } from '../styles/home'; import Hero from '../components/Hero'; import Button from '../components/Button'; import Card from '../components/Card'; import Head from 'next/head'; interface Props { blogPosts: { title: string; author: string; description: string; slug: string; date: string; tags?: string[]; }[]; portfolioProjects: { title: string; description: string; slug: string; date: string; tags?: string[]; }[]; } const Index: FC = ({ blogPosts, portfolioProjects }) => { return ( <> Hazem Krimi

About me

I am a software developer. I have experience as a full stack developer but I lean more to the front end and I have built a lot of web apps and some mobile apps. Also, I am always learning and experimenting with new technologies (currently learning about the ethereum blockchain) and other topics other than software engineering.

{portfolioProjects.length !== 0 && ( <>

Portfolio

{portfolioProjects.slice(0, 3).map(({ slug, ...rest }) => ( ))}
)} {blogPosts.length !== 0 && ( <>

Blog

{blogPosts.slice(0, 3).map(({ slug, ...rest }) => ( ))}
)}
); }; export default Index; export const getStaticProps: GetStaticProps = async () => { const blogPosts = getBlogPosts(); const portfolioProjects = getPortfolioProjects(); return { props: { blogPosts, portfolioProjects } }; };