feat: partner badge in marketplace (#14258)
This commit is contained in:
13
web/hooks/use-theme.ts
Normal file
13
web/hooks/use-theme.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Theme } from '@/types/app'
|
||||
import { useTheme as useBaseTheme } from 'next-themes'
|
||||
|
||||
const useTheme = () => {
|
||||
const { theme, resolvedTheme, ...rest } = useBaseTheme()
|
||||
return {
|
||||
// only returns 'light' or 'dark' theme
|
||||
theme: theme === Theme.system ? resolvedTheme as Theme : theme as Theme,
|
||||
...rest,
|
||||
}
|
||||
}
|
||||
|
||||
export default useTheme
|
Reference in New Issue
Block a user