12 lines
254 B
TypeScript
12 lines
254 B
TypeScript
import { useTheme } from "@/context/ThemeContext";
|
|
import { ColorSchemeName } from "react-native";
|
|
|
|
export function useColorScheme(): ColorSchemeName {
|
|
try {
|
|
const { theme } = useTheme();
|
|
return theme;
|
|
} catch (e) {
|
|
return "light";
|
|
}
|
|
}
|