2 Redesigning my Portfolio website

2 Redesigning my Portfolio website

Upgrading tioye.dev from HTML, CSS, JS to Next.JS and GraphQL

Short Update: Blog is working!

I spent the last two days focusing on the blog page. I was able to connect the GraphCMS backend to the frontend and the routes and data fetching is functional.

The first difficulty I faced when attempting to connect was trying to use the React useEffect hooks. Those attempts were futile and I resorted to the GraphCMS documentation for NextJS which was based on getStaticProps. It was trivial to copy the code example from the documentation and make small updates to get it to work.

So far, I am able to display all the categories of posts in the database as well as all posts. I have designed the routes to be able to fetch a single post from the database and reroute us to the single post page based on the slug.

Screenshot from 2022-10-10 16-38-53.png

The next step for the post page is to make sure we can click on the categories and fetch all posts belonging to that category or series of posts.