2022-02-28 00:08:20 +01:00
|
|
|
import { ReactNode } from "react";
|
2022-02-28 22:00:32 +01:00
|
|
|
import { Link } from "react-router-dom";
|
2022-12-13 23:50:13 +01:00
|
|
|
import { IconPatch } from "@/components/buttons/IconPatch";
|
|
|
|
import { Icons } from "@/components/Icon";
|
|
|
|
import { DISCORD_LINK, GITHUB_LINK } from "@/mw_constants";
|
2022-02-25 21:50:36 +01:00
|
|
|
import { BrandPill } from "./BrandPill";
|
|
|
|
|
2022-02-28 00:08:20 +01:00
|
|
|
export interface NavigationProps {
|
|
|
|
children?: ReactNode;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function Navigation(props: NavigationProps) {
|
2022-02-25 21:50:36 +01:00
|
|
|
return (
|
2022-12-13 23:50:13 +01:00
|
|
|
<div className="absolute left-0 right-0 top-0 flex min-h-[88px] items-center justify-between py-5 px-7">
|
|
|
|
<div className="flex w-full items-center justify-center sm:w-fit">
|
2022-05-17 03:03:17 +02:00
|
|
|
<div className="mr-auto sm:mr-6">
|
2022-02-28 22:00:32 +01:00
|
|
|
<Link to="/">
|
|
|
|
<BrandPill clickable />
|
2022-02-28 00:08:20 +01:00
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
{props.children}
|
2022-02-25 21:50:36 +01:00
|
|
|
</div>
|
2022-12-13 23:50:13 +01:00
|
|
|
<div
|
|
|
|
className={`${
|
|
|
|
props.children ? "hidden sm:flex" : "flex"
|
|
|
|
} flex-row gap-4`}
|
|
|
|
>
|
2022-02-28 22:00:32 +01:00
|
|
|
<a
|
|
|
|
href={DISCORD_LINK}
|
|
|
|
target="_blank"
|
|
|
|
rel="noreferrer"
|
|
|
|
className="text-2xl text-white"
|
|
|
|
>
|
|
|
|
<IconPatch icon={Icons.DISCORD} clickable />
|
|
|
|
</a>
|
|
|
|
<a
|
|
|
|
href={GITHUB_LINK}
|
|
|
|
target="_blank"
|
|
|
|
rel="noreferrer"
|
|
|
|
className="text-2xl text-white"
|
|
|
|
>
|
|
|
|
<IconPatch icon={Icons.GITHUB} clickable />
|
|
|
|
</a>
|
2022-02-25 21:50:36 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-28 22:00:32 +01:00
|
|
|
);
|
2022-02-25 21:50:36 +01:00
|
|
|
}
|