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