mirror of https://github.com/fantasticit/think.git
client: fix current theme icon
This commit is contained in:
parent
da9847e5b3
commit
6da1283c95
|
@ -4,8 +4,8 @@ import { Theme as ThemeState, ThemeEnum } from 'hooks/use-theme';
|
|||
import React, { useCallback } from 'react';
|
||||
|
||||
export const Theme = () => {
|
||||
const { userPrefer, toggle } = ThemeState.useHook();
|
||||
const Icon = userPrefer === 'dark' ? IconSun : IconMoon;
|
||||
const { userPrefer, theme, toggle } = ThemeState.useHook();
|
||||
const Icon = theme === 'dark' ? IconMoon : IconSun;
|
||||
|
||||
const setLight = useCallback(() => {
|
||||
toggle(ThemeEnum.light);
|
||||
|
|
Loading…
Reference in New Issue