Skip to content

Commit

Permalink
Remove arrows between flags in actions area
Browse files Browse the repository at this point in the history
Remove arrows between Faction flags in the actions area because it's easier to not have them. Might add them back at some point.
  • Loading branch information
iamlogand committed Jul 21, 2024
1 parent b54672b commit 77fd3c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
24 changes: 7 additions & 17 deletions frontend/components/ActionsArea.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useEffect, useState } from "react"
import { Button } from "@mui/material"
import EastIcon from "@mui/icons-material/East"

import Collection from "@/classes/Collection"
import Action from "@/classes/Action"
Expand All @@ -15,8 +14,6 @@ import FactionLink from "@/components/FactionLink"

const typedActionDataCollection: ActionDataCollectionType = ActionDataCollection

const SEQUENTIAL_PHASES = ["Forum", "Last Forum", "Revolution"]

const ActionsArea = () => {
const { user } = useCookieContext()
const {
Expand Down Expand Up @@ -58,10 +55,13 @@ const ActionsArea = () => {
const latestTurn = turns.asArray.sort((a, b) => a.index - b.index)[
turns.allIds.length - 1
]
const latestPhases = (latestTurn) ? phases.asArray.filter((p) => p.turn === latestTurn.id) : []
const latestPhase = (latestPhases.length > 0) ? latestPhases.sort((a, b) => a.index - b.index)[
latestPhases.length - 1
] : null
const latestPhases = latestTurn
? phases.asArray.filter((p) => p.turn === latestTurn.id)
: []
const latestPhase =
latestPhases.length > 0
? latestPhases.sort((a, b) => a.index - b.index)[latestPhases.length - 1]
: null

if (thisFactionsPendingActions) {
const requiredAction = thisFactionsPendingActions.asArray.find(
Expand Down Expand Up @@ -116,16 +116,6 @@ const ActionsArea = () => {
key={index}
className="mt-1 flex items-start justify-center gap-3"
>
{index !== 0 &&
SEQUENTIAL_PHASES.some(
(name) => name === latestPhase?.name
) && (
<div className="self-start w-1 h-6 relative">
<div className="absolute bottom-1/2 right-1/2 translate-x-1/2 translate-y-1/2">
<EastIcon fontSize="small" />
</div>
</div>
)}
<div className="w-6 h-6 flex items-start justify-center">
<FactionIcon
faction={faction}
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/CustomizeFactionName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const CustomizeFactionName = ({ faction }: CustomizeFactionNameProps) => {
/>
<div className="flex flex-col gap-1">
<p className="text-sm">Full name preview</p>
<div className="p-2 border border-solid rounded border-neutral-300 dark:border-neutral-800">
<div className="p-2 border border-solid rounded border-neutral-200 dark:border-neutral-500">
<p>
<b>
<FactionIcon faction={faction} size={17} />{" "}
Expand All @@ -139,7 +139,7 @@ const CustomizeFactionName = ({ faction }: CustomizeFactionNameProps) => {
</div>
<div className="flex flex-col gap-1">
<p className="text-sm">Short name preview</p>
<div className="flex gap-1 w-[164px] p-2 border border-solid rounded border-neutral-300 dark:border-neutral-800">
<div className="flex gap-1 w-[164px] p-2 border border-solid rounded border-neutral-200 dark:border-neutral-500">
<b>
<FactionIcon faction={faction} size={17} />
</b>{" "}
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/FactionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const FactionList = () => {
{unalignedSenators.length > 0 && (
<div className="p-2 rounded border border-solid border-neutral-400 dark:border-neutral-800 bg-neutral-200 dark:bg-neutral-700 flex flex-col gap-2">
<p className="font-bold">
<TermLink name="Unaligned Senator" plural />
<TermLink name="Unaligned Senator" plural hiddenUnderline />
</p>
<div className="flex flex-wrap gap-2">
{unalignedSenators.map((senator) => (
Expand Down

0 comments on commit 77fd3c4

Please sign in to comment.