legoooooo

This commit is contained in:
Violet Caulfield
2024-10-15 07:02:27 -05:00
parent e85f9aade2
commit 9c2ab40bce
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -5,6 +5,8 @@ import _ from "lodash";
export const fetchServerUrl : () => Promise<string> = async () => {
console.log("Attempting to fetch server address from storage");
let url = await AsyncStorage.getItem(AsyncStorageKeys.ServerUrl)!;
if (_.isNull(url))
+3 -1
View File
@@ -6,6 +6,8 @@ import { fetchServerUrl } from "./functions/storage";
export const useCredentials = useQuery({
queryKey: [QueryKeys.Credentials],
queryFn: async () => {
return fetchCredentials(await fetchServerUrl())
let serverUrl = await fetchServerUrl();
return await fetchCredentials(serverUrl);
}
});