Aside from some small personal projects, Nation Energie was my first real introduction to working with Next.Js, TypeScript, Sass and headless Wordpress. It had come to me via another developer. He handled the back end, while I headed up the front end of the project.
The brief was for a brochure style website made up of a number of components including a hero, counters, sliders, scroll indicator and form - a perfect introduction! The design was fairly simple and clean with a focus on white space and imagery showing of the product.
Navigating through TypeScript for the first time proved to be a bit of a challenge! I learned how to type data fetched from headless Wordpress and use it with optional chaining and conditional blocks.
I was introduced to styling in Sass modules, which involved creating a theme .scss file which imported styles for typography, colours and other relevant variables. This allowed the theme module to be imported anywhere in the project for use. The components had their own style sheets.
The website was built using css grid which was set up in a component for readability at a glance. This, along with a typography component proved quite valuable in teaching me ways to restructure reusable code in a meaningful way.
As for the slider, due to the small scale and timeframe for the project, I opted to npm install Swiper to handle the slide functionality.
There were a few minor speed bumps in getting this website production ready. Getting headless Wordpress set up in a docker container for development was certainly a new challenge, followed by actually using Wordpress as a headless CMS and configuring Custom Fields for use in the front end.
The Nation Energie project came at a very opportune moment in my studies. Having just completed courses in React, it was an incredible chance to really put my skills to the test and pick up a few more along the way. Working with the flexibility of Sass was a real eye opener, and now I feel a bit exposed without TypeScript!