Skip to content

Commit

Permalink
BUGFIX add .env theme switcher to middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
lencodes committed Nov 21, 2023
1 parent 5ac5500 commit f2d0740
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pwa/src/hooks/useEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export const useEnvironment = () => {
window.sessionStorage.setItem("SHOW_THEME_SWITCHER", "true");
break;
}

if (process.env.GATSBY_SHOW_THEME_SWITCHER === "true") window.sessionStorage.setItem("SHOW_THEME_SWITCHER", "true");
};

return { initiateFromEnv, initiateFromJSON };
Expand Down

0 comments on commit f2d0740

Please sign in to comment.