diff --git a/client/src/app/pages/dashboard/users/games/_game/_playtype/UGPTSettingsPage.tsx b/client/src/app/pages/dashboard/users/games/_game/_playtype/UGPTSettingsPage.tsx index 13bcbdc82..36a704cc6 100644 --- a/client/src/app/pages/dashboard/users/games/_game/_playtype/UGPTSettingsPage.tsx +++ b/client/src/app/pages/dashboard/users/games/_game/_playtype/UGPTSettingsPage.tsx @@ -182,13 +182,13 @@ function PreferencesForm({ reqUser, game, playtype }: Props) { } function ShowcaseForm({ reqUser, game, playtype }: Props) { - const { settings } = useContext(UGPTSettingsContext); + const { settings, setSettings } = useContext(UGPTSettingsContext); const [stats, setStats] = useState(settings!.preferences.stats); const [show, setShow] = useState(false); const SaveChanges = async () => { - await APIFetchV1( + const r = await APIFetchV1( `/users/${reqUser.id}/games/${game}/${playtype}/showcase`, { method: "PUT", @@ -198,6 +198,10 @@ function ShowcaseForm({ reqUser, game, playtype }: Props) { true, true ); + + if (r.success) { + setSettings(r.body); + } }; const [isFirstPaint, setIsFirstPaint] = useState(true); diff --git a/client/src/components/util/ErrorBoundary.tsx b/client/src/components/util/ErrorBoundary.tsx index 9bcfd3f3e..cf021923e 100644 --- a/client/src/components/util/ErrorBoundary.tsx +++ b/client/src/components/util/ErrorBoundary.tsx @@ -1,4 +1,3 @@ -import { TachiConfig } from "lib/config"; import React from "react"; import CenterLayoutPage from "../layout/CenterLayoutPage"; import DebugContent from "./DebugContent";