mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Invalidate query key
This commit is contained in:
parent
c8d2ce4142
commit
2d313e9ae9
1 changed files with 6 additions and 1 deletions
|
@ -13,11 +13,12 @@ import { getImageResolutionOptions } from 'apps/dashboard/features/libraries/uti
|
|||
import Loading from 'components/loading/LoadingComponent';
|
||||
import Page from 'components/Page';
|
||||
import ServerConnections from 'components/ServerConnections';
|
||||
import { useConfiguration } from 'hooks/useConfiguration';
|
||||
import { QUERY_KEY, useConfiguration } from 'hooks/useConfiguration';
|
||||
import globalize from 'lib/globalize';
|
||||
import React from 'react';
|
||||
import { type ActionFunctionArgs, Form, useActionData, useNavigation } from 'react-router-dom';
|
||||
import { ActionData } from 'types/actionData';
|
||||
import { queryClient } from 'utils/query/queryClient';
|
||||
|
||||
export const action = async ({ request }: ActionFunctionArgs) => {
|
||||
const api = ServerConnections.getCurrentApi();
|
||||
|
@ -36,6 +37,10 @@ export const action = async ({ request }: ActionFunctionArgs) => {
|
|||
await getConfigurationApi(api)
|
||||
.updateConfiguration({ serverConfiguration: config });
|
||||
|
||||
void queryClient.invalidateQueries({
|
||||
queryKey: [ QUERY_KEY ]
|
||||
});
|
||||
|
||||
return {
|
||||
isSaved: true
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue