Skip to content

web: Move theme preference to global state

Administrator requested to merge vk/move-theme-to-global-state into main

Created by: vovakulikov

Prior to this PR, we had theme preference data in the global react state in Layout.tsx component. This was super inconvenient to use this state cause we had to pass this info down by isLightTheme prop.

This PR simply moves theme preference to Zustand global state.

After this PR it will be possible to get theme state from any place within the app with custom hook

const [theme, setTheme] = useThemeState()

Merge request reports

Loading