Skip to content

Commit

Permalink
Add target=_blank to some links
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamarcke committed Apr 6, 2024
1 parent 41b352d commit e40ddbe
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
6 changes: 5 additions & 1 deletion src/components/game/info/GameInfoExternalStores.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ const GameInfoExternalStores = ({ gameId, iconsProps, ...others }: Props) => {
.map((externalStore) => {
if (externalStore.icon == undefined) return null;
return (
<a key={externalStore.id} href={externalStore.url}>
<a
key={externalStore.id}
href={externalStore.url}
target={"_blank"}
>
<Tooltip label={externalStore.storeName}>
<Image
w={42}
Expand Down
48 changes: 36 additions & 12 deletions src/components/general/shell/GlobalShellFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,26 @@ import {
IconBrandTwitter,
} from "@tabler/icons-react";

type IFooterLink = { href: string; label: string };
type IFooterLink = { href: string; label: string; external?: boolean };

const links: IFooterLink[] = [
{ label: "About", href: "/about" },
{ label: "Contact", href: "/contact" },
{ label: "Privacy", href: "/privacy" },
{
label: "Donate",
href: "https://patreon.com/GameNodeApp",
external: true,
},
];

const GlobalShellFooter = () => {
const items = links.map((link) => {
return (
<Link key={link.label} href={link.href}>
<Link
key={link.label}
href={link.href}
target={link.external ? "_blank" : undefined}
>
<Text c="dimmed">{link.label}</Text>
</Link>
);
Expand All @@ -40,15 +49,30 @@ const GlobalShellFooter = () => {
{items}
</Group>
<Group gap="xs" justify="right" wrap={"nowrap"}>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandGithub size="1.05rem" stroke={1.5} />
</ActionIcon>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandDiscord size="1.05rem" stroke={1.5} />
</ActionIcon>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandTwitter size="1.05rem" stroke={1.5} />
</ActionIcon>
<Link
target={"_blank"}
href={"https://github.com/game-node-app"}
>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandGithub size="1.05rem" stroke={1.5} />
</ActionIcon>
</Link>
<Link
target={"_blank"}
href={"https://discord.gg/8cPtfHtk"}
>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandDiscord size="1.05rem" stroke={1.5} />
</ActionIcon>
</Link>
<Link
target={"_blank"}
href={"https://twitter.com/gamenodeapp"}
>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandTwitter size="1.05rem" stroke={1.5} />
</ActionIcon>
</Link>
</Group>
</Container>
</footer>
Expand Down

0 comments on commit e40ddbe

Please sign in to comment.