From 118ae220ee326cc17e1e9dba1e33ac2edf540a04 Mon Sep 17 00:00:00 2001 From: MasterGordon Date: Sat, 28 Jun 2025 16:41:30 +0200 Subject: [PATCH] fixed closing drawer + reconnect --- backend/repositories/gemsRepository.ts | 2 +- src/Shell.tsx | 14 +++++++++++-- src/wsClient.ts | 27 ++++++++++++++++---------- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/backend/repositories/gemsRepository.ts b/backend/repositories/gemsRepository.ts index 43515a9..36693a8 100644 --- a/backend/repositories/gemsRepository.ts +++ b/backend/repositories/gemsRepository.ts @@ -40,6 +40,6 @@ export const removeGems = async ( if (count - gems < 0) throw new Error("Not enough gems"); await db .update(Gems) - .set({ count: count - gems, totalCount: totalCount - gems }) + .set({ count: count - gems, totalCount: totalCount }) .where(eq(Gems.user, user)); }; diff --git a/src/Shell.tsx b/src/Shell.tsx index 4a13e73..d393727 100644 --- a/src/Shell.tsx +++ b/src/Shell.tsx @@ -57,7 +57,14 @@ const Shell: React.FC = ({ children }) => { animate={{ x }} transition={{ type: "tween" }} > -
+
{ + if (isMobile) { + setIsOpen(false); + } + }} + >

Business
@@ -101,7 +108,10 @@ const Shell: React.FC = ({ children }) => {