From 73628fded6d6fabc65fabd4bf1ad655a36090835 Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Sun, 16 Mar 2025 20:17:38 -0400 Subject: [PATCH] Fix raid size not adjusting bug --- src/ui/calendar/CalendarDisplay.tsx | 2 -- src/ui/raidInstance/RaidInstanceHeader.tsx | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ui/calendar/CalendarDisplay.tsx b/src/ui/calendar/CalendarDisplay.tsx index 687234f..4a97b78 100644 --- a/src/ui/calendar/CalendarDisplay.tsx +++ b/src/ui/calendar/CalendarDisplay.tsx @@ -56,8 +56,6 @@ export default function CalendarDisplay({ const showEditCalendarEventModal = (eventClickArg: EventClickArg) => { const calendarEvent = calendarEvents.find((calEvent) => calEvent.calendarEventId === eventClickArg.event.id); - console.log("calendarEvent"); - console.log(calendarEvent); if(raidGroupId && calendarEvent?.gameId){ setDisableModal(true); } diff --git a/src/ui/raidInstance/RaidInstanceHeader.tsx b/src/ui/raidInstance/RaidInstanceHeader.tsx index 0d97aae..2ef8669 100644 --- a/src/ui/raidInstance/RaidInstanceHeader.tsx +++ b/src/ui/raidInstance/RaidInstanceHeader.tsx @@ -45,7 +45,11 @@ export default function RaidInstanceHeader(){ const updateRaidSize = (newRaidSize: number) => { if(newRaidSize > (raidInstance?.raidSize ?? 0)){ - setSelectedClassGroups([...selectedClassGroups, null]); + const newClassGroups = [...selectedClassGroups]; + while(newClassGroups.length < newRaidSize){ + newClassGroups.push(null); + } + setSelectedClassGroups(newClassGroups); } else{ setSelectedClassGroups(selectedClassGroups.slice(0, newRaidSize));