From 275e8c8756112ca270b7f605f7841e9753323c2a Mon Sep 17 00:00:00 2001 From: smolgumball Date: Fri, 21 Jan 2022 15:29:24 -0700 Subject: [PATCH] Cleanup styles + presentation in FactionsRoot.tsx --- src/Faction/ui/FactionsRoot.tsx | 93 ++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 35 deletions(-) diff --git a/src/Faction/ui/FactionsRoot.tsx b/src/Faction/ui/FactionsRoot.tsx index 4efbd3fbf..8a6619a1e 100644 --- a/src/Faction/ui/FactionsRoot.tsx +++ b/src/Faction/ui/FactionsRoot.tsx @@ -1,17 +1,17 @@ -import React, { useState, useEffect } from "react"; -import { IPlayer } from "../../PersonObjects/IPlayer"; -import { IRouter } from "../../ui/Router"; -import { Factions } from "../Factions"; -import { Faction } from "../Faction"; -import { joinFaction } from "../FactionHelpers"; - -import Typography from "@mui/material/Typography"; +import Paper from "@mui/material/Paper"; import Box from "@mui/material/Box"; -import Link from "@mui/material/Link"; import Button from "@mui/material/Button"; import TableBody from "@mui/material/TableBody"; -import { Table, TableCell } from "../../ui/React/Table"; import TableRow from "@mui/material/TableRow"; +import Typography from "@mui/material/Typography"; +import Container from "@mui/material/Container"; +import React, { useEffect, useState } from "react"; +import { IPlayer } from "../../PersonObjects/IPlayer"; +import { Table, TableCell } from "../../ui/React/Table"; +import { IRouter } from "../../ui/Router"; +import { Faction } from "../Faction"; +import { joinFaction } from "../FactionHelpers"; +import { Factions } from "../Factions"; export const InvitationsSeen: string[] = []; @@ -48,42 +48,65 @@ export function FactionsRoot(props: IProps): React.ReactElement { } return ( - <> + Factions - Lists all factions you have joined -
- - {props.player.factions.map((faction: string) => ( - openFaction(Factions[faction])}> - {faction} - - ))} - -
- {props.player.factionInvitations.length > 0 && ( - <> - - Outstanding Faction Invitations - - - Lists factions you have been invited to. You can accept these faction invitations at any time. - - + + Throughout the game you may receive invitations from factions. There are many different factions, and each + faction has different criteria for determining its potential members. Joining a faction and furthering its cause + is crucial to progressing in the game and unlocking endgame content. + + + + Factions you have joined: + + {(props.player.factions.length > 0 && ( + +
- {props.player.factionInvitations.map((faction: string) => ( + {props.player.factions.map((faction: string) => ( {faction} - + + + ))}
- - )} - + + )) || You haven't joined any factions.} + + Outstanding Faction Invitations + + + Factions you have been invited to. You can accept these faction invitations at any time: + + {(props.player.factionInvitations.length > 0 && ( + + + + {props.player.factionInvitations.map((faction: string) => ( + + + + {faction} + + + + + + + + + ))} + +
+
+ )) || You have no outstanding faction invites.} +
); }