Disable guest account button on android

This commit is contained in:
Zoe Roux 2024-03-06 22:34:54 +01:00
parent 93f93f0186
commit e8b4a26eda
2 changed files with 2 additions and 9 deletions

View File

@ -27,7 +27,7 @@ import { useMMKVString } from "react-native-mmkv";
import { Platform } from "react-native";
import { useQueryClient } from "@tanstack/react-query";
import { atom, getDefaultStore, useAtomValue, useSetAtom } from "jotai";
import { useFetch, } from "./query";
import { useFetch } from "./query";
import { KyooErrors } from "./kyoo-errors";
export const TokenP = z.object({

View File

@ -19,7 +19,7 @@
*/
import { QueryIdentifier, QueryPage, ServerInfo, ServerInfoP, useFetch } from "@kyoo/models";
import { Button, P, Input, ts, H1, HR, Link, tooltip } from "@kyoo/primitives";
import { Button, P, Input, ts, H1, HR } from "@kyoo/primitives";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { Platform, View } from "react-native";
@ -47,7 +47,6 @@ export const ServerUrlPage: QueryPage = () => {
const { t } = useTranslation();
const { css } = useYoshiki();
console.log(data);
return (
<View
{...css({
@ -66,12 +65,6 @@ export const ServerUrlPage: QueryPage = () => {
)}
</View>
<View {...css({ marginTop: ts(5) })}>
<Button
text={t("login.guest")}
onPress={() => {}}
disabled={data?.allowGuests != true}
{...(data?.allowGuests === false ? tooltip(t("login.guets-forbidden")) : {})}
/>
<HR />
<View {...css({ flexDirection: "row", gap: ts(2) })}>
<Button