mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-20 00:05:26 +02:00
fix: Pass querykey
This commit is contained in:
parent
ca7cd2be14
commit
a29fe864d3
@ -11,7 +11,8 @@ import {DEFAULT_ADMIN_SETTINGS} from "~/constants/admin-settings"
|
|||||||
import SettingsForm from "~/route-widgets/GlobalSettingsRoute/SettingsForm"
|
import SettingsForm from "~/route-widgets/GlobalSettingsRoute/SettingsForm"
|
||||||
|
|
||||||
export default function GlobalSettingsRoute(): ReactElement {
|
export default function GlobalSettingsRoute(): ReactElement {
|
||||||
const query = useQuery<AdminSettings, AxiosError>(["get_admin_settings"], async () => {
|
const queryKey = ["get_admin_settings"]
|
||||||
|
const query = useQuery<AdminSettings, AxiosError>(queryKey, async () => {
|
||||||
const settings = getAdminSettings()
|
const settings = getAdminSettings()
|
||||||
|
|
||||||
return _.mergeWith({}, DEFAULT_ADMIN_SETTINGS, settings, (o, s) =>
|
return _.mergeWith({}, DEFAULT_ADMIN_SETTINGS, settings, (o, s) =>
|
||||||
@ -21,7 +22,7 @@ export default function GlobalSettingsRoute(): ReactElement {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<QueryResult<AdminSettings> query={query}>
|
<QueryResult<AdminSettings> query={query}>
|
||||||
{settings => <SettingsForm settings={settings} />}
|
{settings => <SettingsForm settings={settings} queryKey={queryKey} />}
|
||||||
</QueryResult>
|
</QueryResult>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user