mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 17:28:31 +03:00
Fix hethans state issue
This commit is contained in:
@@ -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<UGPTSettings>(
|
||||
`/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);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { TachiConfig } from "lib/config";
|
||||
import React from "react";
|
||||
import CenterLayoutPage from "../layout/CenterLayoutPage";
|
||||
import DebugContent from "./DebugContent";
|
||||
|
||||
Reference in New Issue
Block a user