From 0fbd58f72c77fbf3f78084dc19fa870bf88ba13c Mon Sep 17 00:00:00 2001 From: HugoHMZ Date: Sun, 5 Jan 2025 03:49:14 +0900 Subject: [PATCH] [+] unwanted popups: preventing actionWindow popups to be created --- src/app/_contexts/Game.context.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/_contexts/Game.context.tsx b/src/app/_contexts/Game.context.tsx index daf39f3..8a8ee9f 100644 --- a/src/app/_contexts/Game.context.tsx +++ b/src/app/_contexts/Game.context.tsx @@ -47,7 +47,8 @@ export const GameProvider = ({ children }: { children: ReactNode }) => { const promptState = gameState.players?.[user.id].promptState; const { buttons, menuTitle, promptUuid, selectCard, promptType } = promptState; - if (buttons.length > 0 && menuTitle && promptUuid && !selectCard) { + if (promptType === 'actionWindow') return; + else if (buttons.length > 0 && menuTitle && promptUuid && !selectCard) { openPopup('default', { uuid: promptUuid, title: menuTitle,