Originally published at https://blog.bhanuteja.dev/i-revamped-github-jobs-website-using-design-from-frontend-mentor
Welcome to another project showcase. This time, I will be showing the GitHub Jobs project that I did very recently. The design is from FrontendMentor.Io. The website is available at jobs.bhanuteja.dev.
Let’s start with some visuals of how the website looks like.
- Dark Mode Support
- Filters - text, location, full time.
- Infinite Scrolling with Skeleton Loading
- Job Details Page
- I used Tailwind CSS’s inbuilt dark mode support to achieve this.
- Check this pr for more details.
- I then stored the user’s dark mode preference in local storage. So, if the user sets the dark mode, and closes the browser. When he reopens it again, the website will be loaded in dark mode.
- Recently GitHub added a strict CORS policy and we will not be able to request the resources from GitHub using a client.
- So, I had to use a CORS proxy to fetch the data from GitHub Jobs API.
- I tried every one of the proxies mentioned in this blog post. But, the only one that worked for me then was allOrigins.
Implementing this one was straightforward. GitHub API itself supports the option to pass the filters as params, it then returns the filtered data.
- Used React Query’s
useMutationhook to do this.
- Every time the user presses the
Load Morebutton, a mutation is triggered to fetch the jobs from the next page.
- I then combined the job data fetched from the next page with the current job data to show all the jobs up until then.
I used Tailwind CSS animations utilities to show the loading skeleton.
I made the source code for this project open source. You can take a look at it.
Tell me in the comments if you like me to dig deep into any of the things that I discussed in this article. I will be happy to do so.
Here is the repo 👉 pbteja1998/github-jobs-api
The next article will be part of the My Review of Kent C. Dodds’s EpicReact.Dev series. It will be the fifth article in the series. To know more, go to the link below.
My Review of Kent C. Dodds's EpicReact.Dev - Bhanu Teja Pachipulusu's blog
In this series, I will write different blog posts based on workshop content from Kent C. Dodds's EpicReact.Dev as I go through it.
You might also like the following articles that I wrote: