From e230c20c676fa7f8b0fdae60491e1e717b96e9a6 Mon Sep 17 00:00:00 2001 From: Infernalz <51412133+Infernalz92@users.noreply.github.com> Date: Fri, 15 Dec 2023 21:01:46 +0100 Subject: [PATCH] Fix Closing Menu Fixed closing menu on keypress and removed closemenu2 --- html/src/App.jsx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/html/src/App.jsx b/html/src/App.jsx index 71b44aa0..20a1968a 100644 --- a/html/src/App.jsx +++ b/html/src/App.jsx @@ -26,7 +26,7 @@ export default function App() { const [outfitName, setOutfitName] = useState(null) const openingMenu = (e) => { - let data = e.data + let data = e.data switch (data.type) { case 'newPlayer': setNew(true) @@ -98,8 +98,6 @@ export default function App() { if(save) { fetch('https://qbr-clothing/closeMenu', {method: 'POST', body: JSON.stringify({})}) - } else { - fetch('https://qbr-clothing/closeMenu2', {method: 'POST', body: JSON.stringify({})}) } } @@ -116,7 +114,7 @@ export default function App() { fetch('https://qbr-clothing/saveOutfit', {method: 'POST', body: JSON.stringify({ outfitName: outfitName })}) - + closeMenu(true) } } @@ -191,21 +189,21 @@ export default function App() {
- { navSelect === 1 && + { navSelect === 1 && <>

Outfits

- + } - { navSelect === 2 && + { navSelect === 2 && <>

Skin Customization

- + } - { navSelect === 3 && + { navSelect === 3 && <>

Clothing Customization

@@ -216,8 +214,8 @@ export default function App() { - - { (!newPlayer && menuType === 'outfits' || menuType === 'all') && + + { (!newPlayer && menuType === 'outfits' || menuType === 'all') && @@ -235,7 +233,7 @@ export default function App() { } -
@@ -246,3 +244,4 @@ export default function App() { ) } +