Game Hub: Does not default to dark mode

Hi, all,

I just completed the React + TypeScript course Part 1.

There is one outstanding issue: my web page does not default to dark mode.

When I delete chakra-ui-color-mode from the localStorage and reload the page, it always gets set back to ‘light’.

Any suggestions?

I have the following in my theme.ts

// src/theme.ts

// 1. import `extendTheme` function
import { extendTheme, type ThemeConfig } from '@chakra-ui/react'

// 2. Add your color mode config
const config: ThemeConfig = {
  initialColorMode: 'dark',
  useSystemColorMode: false,
}

// 3. extend the theme
const theme = extendTheme({ config,
  colors: {
    gray: {
...
    }
  } })

export default theme

Thanks,

Sawfiz