Generic (non-5e) ruleset mode + UI polish + combat switch fix #7
+5
-1
@@ -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) => {
|
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 at = a.createdAt || 0;
|
||||||
const bt = b.createdAt || 0;
|
const bt = b.createdAt || 0;
|
||||||
if (at === bt) return (a.name || '').localeCompare(b.name || '');
|
if (at === bt) return (a.name || '').localeCompare(b.name || '');
|
||||||
|
|||||||
Reference in New Issue
Block a user