diff --git a/src/routes/(app)/matches/[id]/+page.svelte b/src/routes/(app)/matches/[id]/+page.svelte index 57f159d..9c47154 100644 --- a/src/routes/(app)/matches/[id]/+page.svelte +++ b/src/routes/(app)/matches/[id]/+page.svelte @@ -54,6 +54,8 @@ TB: 'bg-pink-500/20 text-pink-400 border-pink-500/30' }; + const MOD_ORDER = ['NM', 'HD', 'HR', 'DT', 'FM', 'TB']; + // Group mappool slots by category const groupedSlots = $derived(() => { if (!m.mappool?.slots) return {}; @@ -65,7 +67,10 @@ for (const cat of Object.keys(groups)) { groups[cat].sort((a: any, b: any) => a.orderInCategory - b.orderInCategory); } - return groups; + // Return entries sorted by canonical mod order + return Object.fromEntries( + MOD_ORDER.filter((cat) => groups[cat]).map((cat) => [cat, groups[cat]]) + ); }); // Match duration