do tamagui toasts work too?

This commit is contained in:
Violet Caulfield
2025-02-13 16:14:58 -06:00
parent 7e1da470d3
commit d9d096b1f9

View File

@@ -12,14 +12,15 @@ import { JellifyUser } from "../../../types/JellifyUser";
import { ServerAuthenticationProps } from "../../../components/types";
import Input from "../../../components/Global/helpers/input";
import Icon from "../../../components/Global/helpers/icon";
import * as Burnt from "burnt";
import { useToastController } from "@tamagui/toast";
export default function ServerAuthentication({
route,
navigation,
}: ServerAuthenticationProps): React.JSX.Element {
const toast = useToastController()
const [username, setUsername] = useState<string | undefined>(undefined);
const [password, setPassword] = React.useState<string | undefined>(undefined);
@@ -57,12 +58,9 @@ export default function ServerAuthentication({
onError: async (error: Error) => {
console.error("An error occurred connecting to the Jellyfin instance", error);
Burnt.toast({
title: "Unable to connect",
preset: "error",
// message: `Unable to connect to Jellyfin at ${useHttps ? https : http}${serverAddress}`,
});
toast.show("Sign in failed", {
});
return Promise.reject(`An error occured signing into ${Client.server!.name}`);
}
});