Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
feat: set theme styles to always be light-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tabathadelane committed May 6, 2022
1 parent 5e592b8 commit 14bca21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import PropTypes from 'prop-types';
import GlobalStyles from '../components/GlobalStyles';

const Layout = ({ children, pageContext }) => {
//override HTML body class to always be 'light-mode' until site has dark-mode design
const pageBodyClass = document.body.classList;
if (pageBodyClass.contains('dark-mode')) {
pageBodyClass.replace('dark-mode', 'light-mode');
}
if (pageContext.layout === 'QuickStartLayout') {
return (
<QuickStartLayout>
Expand Down

0 comments on commit 14bca21

Please sign in to comment.