diff --git a/frontend/components/FactionList.tsx b/frontend/components/FactionList.tsx index 6927e311..f5df4ef4 100644 --- a/frontend/components/FactionList.tsx +++ b/frontend/components/FactionList.tsx @@ -16,13 +16,11 @@ const FactionList = () => { const [sortedFactions, setSortedFactions] = useState>( new Collection() ) - const unalignedSenators = new Collection( - allSenators.asArray + const unalignedSenators = allSenators.asArray .filter((s) => s.alive) // Filter by alive .filter((s) => s.faction === null) // Filter by unaligned .sort((a, b) => a.generation - b.generation) // Sort by generation .sort((a, b) => a.name.localeCompare(b.name)) ?? [] // Sort by name - ) // Sort the factions useEffect(() => { @@ -56,23 +54,25 @@ const FactionList = () => {
{sortedFactions.asArray.map((faction) => getRow(faction))} -
-

- -

-
- {unalignedSenators.asArray.map((senator) => ( - - ))} + { unalignedSenators.length > 0 && +
+

+ +

+
+ {unalignedSenators.map((senator) => ( + + ))} +
-
+ }
)