mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
fix the correct base point for sorting
This commit is contained in:
@@ -19,6 +19,7 @@ import { IRouter } from "../../ui/Router";
|
|||||||
import { Faction } from "../Faction";
|
import { Faction } from "../Faction";
|
||||||
import { joinFaction } from "../FactionHelpers";
|
import { joinFaction } from "../FactionHelpers";
|
||||||
import { Factions } from "../Factions";
|
import { Factions } from "../Factions";
|
||||||
|
import { FactionNames } from "../data/FactionNames";
|
||||||
|
|
||||||
export const InvitationsSeen: string[] = [];
|
export const InvitationsSeen: string[] = [];
|
||||||
|
|
||||||
@@ -79,9 +80,10 @@ export function FactionsRoot(props: IProps): React.ReactElement {
|
|||||||
(augmentation: string) => !player.hasAugmentation(augmentation)
|
(augmentation: string) => !player.hasAugmentation(augmentation)
|
||||||
).length;
|
).length;
|
||||||
}
|
}
|
||||||
let allJoinedFactions = props.player.factions
|
|
||||||
allJoinedFactions = allJoinedFactions.sort((a, b) =>
|
const allFactions = Object.values(FactionNames).map(faction => faction as string)
|
||||||
allJoinedFactions.indexOf(a) - allJoinedFactions.indexOf(b));
|
const allJoinedFactions = props.player.factions.sort((a, b) =>
|
||||||
|
allFactions.indexOf(a) - allFactions.indexOf(b));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container disableGutters maxWidth="md" sx={{ mx: 0, mb: 10 }}>
|
<Container disableGutters maxWidth="md" sx={{ mx: 0, mb: 10 }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user