added save and load endpoints

This commit is contained in:
2025-11-17 10:19:44 +00:00
parent 5ce70ffa06
commit d2f030f221
10 changed files with 52 additions and 11 deletions

View File

@@ -16,6 +16,11 @@ const SoundBtn = () => {
path: "soundEnabled",
value: { enabled: newEnabled },
});
await mutation.mutateAsync({
operation: "SAVE",
path: "",
value: null,
});
};
useEffect(() => {
setEnabled(query?.data?.soundEnabled?.enabled);
@@ -23,10 +28,7 @@ const SoundBtn = () => {
return (
<button onClick={handleClick}>
<FontAwesomeIcon
icon={enabled ? faVolumeHigh : faVolumeXmark}
size="2x"
/>
<FontAwesomeIcon icon={enabled ? faVolumeHigh : faVolumeXmark} size="2x" />
</button>
);
};