添加主题切换、多语言支持
This commit is contained in:
@@ -1 +1,11 @@
|
||||
export { useColorScheme } from 'react-native';
|
||||
import { useTheme } from "@/context/ThemeContext";
|
||||
import { ColorSchemeName } from "react-native";
|
||||
|
||||
export function useColorScheme(): ColorSchemeName {
|
||||
try {
|
||||
const { theme } = useTheme();
|
||||
return theme;
|
||||
} catch (e) {
|
||||
return "light";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user