fix bug themes
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { useRouter } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { StyleSheet, View, ScrollView } from "react-native";
|
||||
import { ScrollView, StyleSheet, View } from "react-native";
|
||||
|
||||
import EnIcon from "@/assets/icons/en_icon.png";
|
||||
import VnIcon from "@/assets/icons/vi_icon.png";
|
||||
import RotateSwitch from "@/components/rotate-switch";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { ThemedText } from "@/components/themed-text";
|
||||
import { ThemedView } from "@/components/themed-view";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
import { DOMAIN, TOKEN } from "@/constants";
|
||||
import { useAppTheme } from "@/hooks/use-app-theme";
|
||||
import { useI18n } from "@/hooks/use-i18n";
|
||||
import { useThemeContext } from "@/hooks/use-theme-context";
|
||||
import { removeStorageItem } from "@/utils/storage";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
type Todo = {
|
||||
@@ -24,7 +24,7 @@ export default function SettingScreen() {
|
||||
const router = useRouter();
|
||||
const [data, setData] = useState<Todo | null>(null);
|
||||
const { t, locale, setLocale } = useI18n();
|
||||
const { colors } = useThemeContext();
|
||||
const { colors } = useAppTheme();
|
||||
const [isEnabled, setIsEnabled] = useState(locale === "vi");
|
||||
|
||||
// Sync isEnabled state khi locale thay đổi
|
||||
|
||||
Reference in New Issue
Block a user