Add tooltip on backdoored location name

This commit is contained in:
Martin Fournier 2021-12-31 06:23:52 -05:00
parent b578e09986
commit 50f41e79e6

@ -29,6 +29,7 @@ import { GetServer } from "../../Server/AllServers";
import { CorruptableText } from "../../ui/React/CorruptableText"; import { CorruptableText } from "../../ui/React/CorruptableText";
import { use } from "../../ui/Context"; import { use } from "../../ui/Context";
import { serverMetadata } from "../../Server/data/servers"; import { serverMetadata } from "../../Server/data/servers";
import { Tooltip } from "@mui/material";
type IProps = { type IProps = {
loc: Location; loc: Location;
@ -92,8 +93,11 @@ export function GenericLocation({ loc }: IProps): React.ReactElement {
return ( return (
<> <>
<Button onClick={() => router.toCity()}>Return to World</Button> <Button onClick={() => router.toCity()}>Return to World</Button>
<Typography variant="h4"> <Typography variant="h4" sx={{ mt: 1 }}>
{backdoorInstalled && !Settings.DisableTextEffects ? <CorruptableText content={loc.name} /> : loc.name} {backdoorInstalled && !Settings.DisableTextEffects ? (
<Tooltip title={`Backdoor installed on ${loc.name}.`}>
<span><CorruptableText content={loc.name} /></span>
</Tooltip>) : loc.name}
</Typography> </Typography>
{locContent} {locContent}
</> </>