mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-22 09:58:46 -05:00
legoooooo
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user