Remove LanguageSwitcher

This commit is contained in:
Simon Caron
2024-12-31 14:39:04 -05:00
parent f2eadabf6a
commit 946de97580
2 changed files with 0 additions and 38 deletions

View File

@@ -1,7 +1,6 @@
import { Button } from "@/components/Button";
import { Input } from "@/components/common/Input";
import { Text } from "@/components/common/Text";
import { LanguageSwitcher } from "@/components/LanguageSwitcher";
import { apiAtom, useJellyfin } from "@/providers/JellyfinProvider";
import { Ionicons } from "@expo/vector-icons";
import { PublicSystemInfo } from "@jellyfin/sdk/lib/generated-client";
@@ -296,7 +295,6 @@ const CredentialsSchema = z.object({
<Text className="text-xs text-neutral-500">
{t("server.server_url_hint")}
</Text>
<LanguageSwitcher />
</View>
<View className="mb-2 absolute bottom-0 left-0 w-full px-4">
<Button

View File

@@ -1,36 +0,0 @@
import { Text } from "@/components/common/Text";
import { useSettings } from "@/utils/atoms/settings";
import { getLocales } from "expo-localization";
import { useTranslation } from "react-i18next";
import { TouchableOpacity, View, ViewProps } from "react-native";
interface Props extends ViewProps {}
export const LanguageSwitcher: React.FC<Props> = ({ ...props }) => {
const { i18n } = useTranslation();
const lngs = ["en", "fr", "sv"];
const [settings, updateSettings] = useSettings();
return (
<View className="flex flex-row space-x-2" {...props}>
{lngs.map((l) => (
<TouchableOpacity
key={l}
onPress={() => {
i18n.changeLanguage(l);
updateSettings({ preferedLanguage: l });
}}
>
<Text
className={`uppercase ${
i18n.language === l ? "text-blue-500" : "text-gray-400 underline"
}`}
>
{l}
</Text>
</TouchableOpacity>
))}
</View>
);
};