Update FactionRoot.tsx

Run Prettier

Manually fixed trailing space for lint test
This commit is contained in:
borisflagell 2022-04-21 18:51:04 +02:00
parent e05617d9d3
commit 421e7b8c74

@ -104,7 +104,7 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
const canPurchaseSleeves = faction.name === FactionNames.TheCovenant && player.bitNodeN === 10; const canPurchaseSleeves = faction.name === FactionNames.TheCovenant && player.bitNodeN === 10;
// Note : For future-proofing sake, an assumption is made that player is intended to retain access to his gang if his karma were to somehow increases. // Note : For future-proofing sake, an assumption is made that player is intended to retain access to his gang if his karma were to somehow increases.
let isManageGangVisible = GangConstants.Names.includes(faction.name) && player.isAwareOfGang(); let isManageGangVisible = GangConstants.Names.includes(faction.name) && player.isAwareOfGang();
// karma threshold is only checked at that point, via canAccessGang(). No further check is made. // karma threshold is only checked at that point, via canAccessGang(). No further check is made.
let isManageGangClickable = player.canAccessGang(); let isManageGangClickable = player.canAccessGang();
@ -128,20 +128,20 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
{isManageGangVisible && ( {isManageGangVisible && (
<> <>
<Box> <Box>
<Paper sx={{ my: 1, p: 1 }}> <Paper sx={{ my: 1, p: 1 }}>
<Tooltip <Tooltip
title={ title={!isManageGangClickable ? <Typography>Unlocked when reaching -54000 karma</Typography> : ""}
!isManageGangClickable ? <Typography>Unlocked when reaching -54000 karma</Typography> : "" >
} <span>
> <Button onClick={manageGang} disabled={!isManageGangClickable}>
<span> {"Manage Gang"}
<Button onClick={manageGang} disabled={!isManageGangClickable}>{"Manage Gang"}</Button> </Button>
<Typography>{gangInfo}</Typography> <Typography>{gangInfo}</Typography>
</span> </span>
</Tooltip> </Tooltip>
</Paper> </Paper>
</Box> </Box>
<CreateGangModal facName={faction.name} open={gangOpen} onClose={() => setGangOpen(false)} /> <CreateGangModal facName={faction.name} open={gangOpen} onClose={() => setGangOpen(false)} />
</> </>
)} )}