fix persistence issue for fresh installation
This commit is contained in:
parent
a390bc7615
commit
0af570848a
2 changed files with 20 additions and 3 deletions
|
@ -25,9 +25,15 @@ export default function useAppModel() {
|
|||
}
|
||||
);
|
||||
function setSolution(id: number, guesses: number) {
|
||||
setStore("solutions", id, {
|
||||
const nextSolutions = [
|
||||
...(store.solutions ?? []),
|
||||
];
|
||||
nextSolutions[id] = {
|
||||
id,
|
||||
guesses
|
||||
guesses,
|
||||
}
|
||||
setStore({
|
||||
solutions: nextSolutions
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue