Fix user not getting deleted on server change
This commit is contained in:
2 files changed
+3
-3
No files matched your search
+1
-3
@@ -97,7 +97,7 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { CircularProgress } from "@mui/material";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api";
|
||||
import { setServerReachability, useServerStore } from "./utils/store/server";
|
||||
import { useServerStore } from "./utils/store/server";
|
||||
|
||||
const anim = {
|
||||
initial: {
|
||||
@@ -261,8 +261,6 @@ function App() {
|
||||
state.isPending,
|
||||
]);
|
||||
|
||||
const [serverReachable] = useServerStore((state) => [state.reachable]);
|
||||
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
const serverSaved = async () => {
|
||||
|
||||
@@ -20,6 +20,7 @@ import { AppBarBackOnly } from "../../../components/appBar/backOnly";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { createApi } from "../../../utils/store/api";
|
||||
import { delUser } from "../../../utils/storage/user";
|
||||
|
||||
const ServerList = () => {
|
||||
const navigate = useNavigate();
|
||||
@@ -36,6 +37,7 @@ const ServerList = () => {
|
||||
const handleServerChange = useMutation({
|
||||
mutationFn: () => {
|
||||
setDefaultServer(serverState);
|
||||
delUser();
|
||||
},
|
||||
onSuccess: async () => {
|
||||
defaultServer.refetch();
|
||||
|
||||
Reference in new issue
Block a user