From fd464633088785cb762f7b5abe87d4d0ddd73a1c Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 26 Oct 2022 11:19:23 +0000 Subject: [PATCH] Update FurnitureContextMenuView.tsx --- .../furniture/context-menu/FurnitureContextMenuView.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx b/src/components/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx index 3e2dfac7..a0795b58 100644 --- a/src/components/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx +++ b/src/components/room/widgets/furniture/context-menu/FurnitureContextMenuView.tsx @@ -17,7 +17,7 @@ const EFFECTBOX_OPEN: string = 'EFFECTBOX_OPEN'; export const FurnitureContextMenuView: FC<{}> = props => { const { closeConfirm = null, processAction = null, onClose = null, objectId = -1, mode = null, confirmMode = null, confirmingObjectId = -1, groupData = null, isGroupMember = false } = useFurnitureContextMenuWidget(); - const { alerts = [], simpleAlert = null, closeAlert = null } = useNotification(); + const { simpleAlert = null } = useNotification(); useMessageEvent(CustomUserNotificationMessageEvent, event => { @@ -27,7 +27,7 @@ export const FurnitureContextMenuView: FC<{}> = props => // HOPPER_NO_COSTUME = 1; HOPPER_NO_HC = 2; GATE_NO_HC = 3; STARS_NOT_CANDIDATE = 4 (not coded in Emulator); STARS_NOT_ENOUGH_USERS = 5 (not coded in Emulator); - switch(parser['_code']) + switch(parser.count) { case 1: simpleAlert(LocalizeText('costumehopper.costumerequired.bodytext'), null, 'catalog/open/temporary_effects' , LocalizeText('costumehopper.costumerequired.buy'), LocalizeText('costumehopper.costumerequired.header'), null); @@ -39,10 +39,6 @@ export const FurnitureContextMenuView: FC<{}> = props => simpleAlert(LocalizeText('gate.viprequired.bodytext'), null, 'catalog/open/habbo_club' , LocalizeText('viprequired.buy.vip'), LocalizeText('gate.viprequired.title'), null); break; } - - if(!alerts || !alerts.length) return null; - - closeAlert(alerts.pop()); }); return (