Massive/use-dark.ts
Brandon Presley f778426aba Run prettier
Something happened with the deno formatter,
I can't remember what! Hahahahahaahahaha
2023-08-12 15:23:02 +12:00

12 lines
294 B
TypeScript

import { useColorScheme } from "react-native";
import { useTheme } from "./use-theme";
export default function useDark() {
const dark = useColorScheme() === "dark";
const { theme } = useTheme();
if (theme === "dark") return true;
if (theme === "light") return false;
return dark;
}