Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
Fixed game not added until refresh when adding a new item to the game…
Browse files Browse the repository at this point in the history
… list
  • Loading branch information
theripper93 committed Sep 8, 2023
1 parent 763044e commit a4f381a
Show file tree
Hide file tree
Showing 3 changed files with 7,217 additions and 5,372 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
"@electron-forge/plugin-auto-unpack-natives": "^6.4.1",
"@electron-forge/plugin-local-electron": "^6.4.1",
"@electron-forge/plugin-vite": "^6.4.1",
"@types/node": "^20.5.9",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"electron": "25.6.0",
"electron-builder": "^24.6.4",
"eslint": "^8.0.1",
"eslint-plugin-import": "^2.25.0",
"ts-node": "^10.0.0",
"typescript": "~4.5.4",
"@types/node": "^20.5.9"
"typescript": "~4.5.4"
},
"scripts": {
"start": "electron-forge start",
Expand Down
3 changes: 2 additions & 1 deletion src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ document.querySelector("#add-game").addEventListener("click", () => {
gameListJson.push({name: gameName, url: gameUrl, id: Math.round(Math.random() * 1000000)});
window.localStorage.setItem("gameList", JSON.stringify(gameListJson));
(document.querySelector("#game-url") as HTMLInputElement).value = "";
(document.querySelector("#game-name") as HTMLInputElement).value = "";
(document.querySelector("#game-name") as HTMLInputElement).value = "";
createGameList();
});

async function createGameList() {
Expand Down
Loading

0 comments on commit a4f381a

Please sign in to comment.