Merge pull request #2250 from MartinFournier/feature/backdoored-loc-tooltip

Add tooltip on backdoored location name
This commit is contained in:
hydroflame 2022-01-02 11:38:01 -05:00 committed by GitHub
commit 8cfb355ca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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