issues
search
praneeth-rdy
/
praneeth-rdy.github.io
This is my static portfolio website built using Gatsby which is an open-source static site generator built on top of Node.js using React and GraphQL. This site is delpoyed on GitHub Pages.
https://praneeth-rdy.github.io/
MIT License
0
stars
1
forks
source link
Global Context Addition
#4
Closed
praneeth-rdy
closed
2 years ago
praneeth-rdy
commented
2 years ago
Fixes #1 #2
Changes & Functionality
Created a ThemeContextProvider which has a list value of the theme and toggleThemeMode function.
toggleThemeMode function handles the localStorage also.
The useEffect added in the ThemeContextProvider initialises the theme value by fetching it from localStorage.
Changed the 404 page and blog-post template to the functional component.
Wrapped the layout in all the pages with ThemeContextProvider.
Fixes #1 #2
Changes & Functionality