getting animations to look correct on login flow

This commit is contained in:
Violet Caulfield
2024-10-20 09:48:12 -05:00
parent 61e6f42bd0
commit 2246679e10
2 changed files with 11 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import _ from "lodash";
import { useColorScheme } from "react-native";
import AsyncStorage from "@react-native-async-storage/async-storage";
@@ -54,6 +54,10 @@ export default function ServerAddress(): React.JSX.Element {
}
});
useEffect(() => {
setChangeServer(false);
})
return (
<View marginHorizontal={10} flex={1} justifyContent='center'>
<H2 marginVertical={30}>

View File

@@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect } from "react";
import { useMutation } from "@tanstack/react-query";
import { useApiClientContext } from "../../jellyfin-api-provider";
import _ from "lodash";
@@ -11,7 +11,7 @@ export default function ServerAuthentication(): React.JSX.Element {
const [username, setUsername] = React.useState('');
const [password, setPassword] = React.useState('');
const { apiClient, setApiClient, server, setChangeServer, setUsername: setContextUsername } = useApiClientContext();
const { apiClient, setApiClient, server, setChangeUser, setChangeServer, setUsername: setContextUsername } = useApiClientContext();
const useApiMutation = useMutation({
mutationFn: async (credentials: JellyfinCredentials) => {
@@ -49,6 +49,10 @@ export default function ServerAuthentication(): React.JSX.Element {
}
});
useEffect(() => {
setChangeUser(false);
})
return (
<View marginHorizontal={10} flex={1} justifyContent='center'>
<H2 marginVertical={30}>