Fix server validation on app startup #74

This commit is contained in:
prayag17 committed 2023-05-14 17:31:59 +05:30
1 parent 9f4c2f990a
commit 3738d81fab
2 files changed
+6 -5

No files matched your search

+5 -4
View File
@@ -68,8 +68,8 @@ import { version as appVer } from "../package.json";
import { v4 as uuidv4 } from "uuid";
import { delServer, getServer } from "./utils/storage/servers.js";
import { delUser, getUser } from "./utils/storage/user.js";
import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api.js";
import { useQuery } from "@tanstack/react-query";
import axios from "axios";
const jellyfin = new Jellyfin({
clientInfo: {
@@ -182,6 +182,7 @@ function App() {
enqueueSnackbar("Unable to verfiy server address.", {
variant: "error",
});
console.error(error);
}
};
@@ -243,13 +244,13 @@ function App() {
if (reason && reason == "backdropClick") {
return;
}
let result = await relaunch();
await relaunch();
};
const handleRemoveServer = async () => {
await delServer();
await delUser();
let result = await relaunch();
await relaunch();
};
const location = useLocation();