mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Linting
This commit is contained in:
parent
c9f42e497a
commit
0474e0355e
6 changed files with 10 additions and 15 deletions
|
|
@ -18,13 +18,13 @@ const assertTheme = theme =>
|
|||
? theme
|
||||
: DEFAULT_THEME
|
||||
|
||||
export const useThemeEngine = (defaultTheme = DEFAULT_THEME) => {
|
||||
export const useThemeEngine = (initialTheme = DEFAULT_THEME) => {
|
||||
const [currentTheme, setCurrentTheme] =
|
||||
useState(DEFAULT_THEME)
|
||||
useState(initialTheme)
|
||||
|
||||
const setTheme = useCallback(theme => {
|
||||
setCurrentTheme(assertTheme(theme))
|
||||
}, [currentTheme]);
|
||||
const setTheme = useCallback(theme => {
|
||||
setCurrentTheme(assertTheme(theme))
|
||||
}, [currentTheme])
|
||||
|
||||
return { currentTheme, setTheme, themes };
|
||||
return { currentTheme, setTheme, themes }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue