Generic (non-5e) ruleset mode + UI polish + combat switch fix #7

Merged
robert merged 25 commits from feat/generic-ruleset into main 2026-07-08 22:54:04 -04:00
Showing only changes of commit 9dbbb88730 - Show all commits
+5 -1
View File
@@ -2377,8 +2377,12 @@ function AdminView({ userId }) {
})
);
// newest first by createdAt (fallback to name for stable order).
// sort by order field (fallback createdAt)
detailedCampaigns.sort((a, b) => {
const ao = a.order ?? null, bo = b.order ?? null;
if (ao !== null && bo !== null) return ao - bo;
if (ao !== null) return -1;
if (bo !== null) return 1;
const at = a.createdAt || 0;
const bt = b.createdAt || 0;
if (at === bt) return (a.name || '').localeCompare(b.name || '');