Fix raid size not adjusting bug

This commit is contained in:
2025-03-16 20:17:38 -04:00
parent 5f238ea185
commit 73628fded6
2 changed files with 5 additions and 3 deletions

View File

@@ -56,8 +56,6 @@ export default function CalendarDisplay({
const showEditCalendarEventModal = (eventClickArg: EventClickArg) => { const showEditCalendarEventModal = (eventClickArg: EventClickArg) => {
const calendarEvent = calendarEvents.find((calEvent) => calEvent.calendarEventId === eventClickArg.event.id); const calendarEvent = calendarEvents.find((calEvent) => calEvent.calendarEventId === eventClickArg.event.id);
console.log("calendarEvent");
console.log(calendarEvent);
if(raidGroupId && calendarEvent?.gameId){ if(raidGroupId && calendarEvent?.gameId){
setDisableModal(true); setDisableModal(true);
} }

View File

@@ -45,7 +45,11 @@ export default function RaidInstanceHeader(){
const updateRaidSize = (newRaidSize: number) => { const updateRaidSize = (newRaidSize: number) => {
if(newRaidSize > (raidInstance?.raidSize ?? 0)){ if(newRaidSize > (raidInstance?.raidSize ?? 0)){
setSelectedClassGroups([...selectedClassGroups, null]); const newClassGroups = [...selectedClassGroups];
while(newClassGroups.length < newRaidSize){
newClassGroups.push(null);
}
setSelectedClassGroups(newClassGroups);
} }
else{ else{
setSelectedClassGroups(selectedClassGroups.slice(0, newRaidSize)); setSelectedClassGroups(selectedClassGroups.slice(0, newRaidSize));