Skip to content

Commit

Permalink
fix: Use custom dummy component
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed May 26, 2020
1 parent 4cbd1d0 commit 2fd4fb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const defaultGlobalCss = css`
}
`

const DummyColorModeProvider: React.FC<any> = ({ children }) => children

// --

export interface AppTraits {
Expand All @@ -53,7 +55,7 @@ export function createChakraNextApp(
Providers: React.Fragment,
}
) {
const ColorMode = enableColorMode ? ColorModeProvider : React.Fragment
const ColorMode = enableColorMode ? ColorModeProvider : DummyColorModeProvider
return class ChakraNextApp extends App {
render() {
const { Component, pageProps } = this.props
Expand Down

0 comments on commit 2fd4fb0

Please sign in to comment.