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 { CircularProgress } from "@mui/material";
|
||||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||||
import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api";
|
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 = {
|
const anim = {
|
||||||
initial: {
|
initial: {
|
||||||
@@ -261,8 +261,6 @@ function App() {
|
|||||||
state.isPending,
|
state.isPending,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const [serverReachable] = useServerStore((state) => [state.reachable]);
|
|
||||||
|
|
||||||
const { enqueueSnackbar } = useSnackbar();
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
|
|
||||||
const serverSaved = async () => {
|
const serverSaved = async () => {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { AppBarBackOnly } from "../../../components/appBar/backOnly";
|
|||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useSnackbar } from "notistack";
|
import { useSnackbar } from "notistack";
|
||||||
import { createApi } from "../../../utils/store/api";
|
import { createApi } from "../../../utils/store/api";
|
||||||
|
import { delUser } from "../../../utils/storage/user";
|
||||||
|
|
||||||
const ServerList = () => {
|
const ServerList = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -36,6 +37,7 @@ const ServerList = () => {
|
|||||||
const handleServerChange = useMutation({
|
const handleServerChange = useMutation({
|
||||||
mutationFn: () => {
|
mutationFn: () => {
|
||||||
setDefaultServer(serverState);
|
setDefaultServer(serverState);
|
||||||
|
delUser();
|
||||||
},
|
},
|
||||||
onSuccess: async () => {
|
onSuccess: async () => {
|
||||||
defaultServer.refetch();
|
defaultServer.refetch();
|
||||||
|
|||||||
Reference in new issue
Block a user