sendou.ink/app/components/layout/SideNav.tsx
hfcRed 3bfa182c9f
Adjusted side nav (#1524)
* Changed nav and side to be sticky

* Centered calendar

* Adjusted top padding

* Added firefox scrollbar styling

* Adjusted scroll colors to fit theme

* Somehow this broke?? 😭

* Fix lint

* Adjust calendar padding

---------

Co-authored-by: hfcRed <hfcred@gmx.net>
Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>
2023-10-21 13:22:28 +03:00

33 lines
910 B
TypeScript

import { Link } from "@remix-run/react";
import navItems from "~/components/layout/nav-items.json";
import { useTranslation } from "~/hooks/useTranslation";
import { navIconUrl } from "~/utils/urls";
import { Image } from "../Image";
export function SideNav() {
const { t } = useTranslation(["common"]);
return (
<nav className="layout__side-nav layout__item_size">
{navItems.map((item) => {
return (
<Link
to={`/${item.url}`}
key={item.name}
prefetch={item.prefetch ? "render" : undefined}
>
<div className="layout__side-nav-image-container">
<Image
path={navIconUrl(item.name)}
height={32}
width={32}
alt={t(`common:pages.${item.name}` as any)}
/>
</div>
</Link>
);
})}
</nav>
);
}