2022-10-31 04:22:08 +00:00
|
|
|
import {useColorScheme} from 'react-native'
|
2022-11-01 03:50:03 +00:00
|
|
|
import {useTheme} from './use-theme'
|
2022-10-04 01:35:56 +00:00
|
|
|
|
|
|
|
export default function useDark() {
|
2022-10-31 04:22:08 +00:00
|
|
|
const dark = useColorScheme() === 'dark'
|
2022-11-01 03:50:03 +00:00
|
|
|
const {theme} = useTheme()
|
2022-10-04 01:35:56 +00:00
|
|
|
|
2022-11-01 03:50:03 +00:00
|
|
|
if (theme === 'dark') return true
|
|
|
|
if (theme === 'light') return false
|
2022-10-31 04:22:08 +00:00
|
|
|
return dark
|
2022-10-04 01:35:56 +00:00
|
|
|
}
|