File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export function ThemeProvider({
2626 storageKey = 'vite-ui-theme' ,
2727 ...props
2828} : ThemeProviderProps ) {
29- const [ theme , setThemeState ] = useState < Theme > (
29+ const [ theme , _setTheme ] = useState < Theme > (
3030 ( ) => ( localStorage . getItem ( storageKey ) as Theme ) || defaultTheme
3131 )
3232
@@ -56,7 +56,7 @@ export function ThemeProvider({
5656
5757 const setTheme = ( theme : Theme ) => {
5858 localStorage . setItem ( storageKey , theme )
59- setThemeState ( theme )
59+ _setTheme ( theme )
6060 }
6161
6262 const value = {
@@ -71,6 +71,7 @@ export function ThemeProvider({
7171 )
7272}
7373
74+ // eslint-disable-next-line react-refresh/only-export-components
7475export const useTheme = ( ) => {
7576 const context = useContext ( ThemeProviderContext )
7677
You can’t perform that action at this time.
0 commit comments