import { json } from "@remix-run/node"; import type { LinksFunction, LoaderFunction } from "@remix-run/node"; import { Link, NavLink, Outlet, useLoaderData } from "@remix-run/react"; import { Badge } from "~/components/Badge"; import { Main } from "~/components/Main"; import { db } from "~/db"; import type { FindAll } from "~/db/models/badges/queries.server"; import styles from "~/styles/badges.css"; import { BADGES_PAGE, BORZOIC_TWITTER, FAQ_PAGE, navIconUrl, } from "~/utils/urls"; import { Trans } from "react-i18next"; import { useTranslation } from "~/hooks/useTranslation"; import { useAnimateListEntry } from "~/hooks/useAnimateListEntry"; import { type SendouRouteHandle } from "~/utils/remix"; export const links: LinksFunction = () => { return [{ rel: "stylesheet", href: styles }]; }; export interface BadgesLoaderData { badges: FindAll; } export const handle: SendouRouteHandle = { i18n: "badges", breadcrumb: () => ({ imgPath: navIconUrl("badges"), href: BADGES_PAGE, type: "IMAGE", }), }; export const loader: LoaderFunction = () => { return json({ badges: db.badges.all() }); }; export default function BadgesPageLayout() { const { t } = useTranslation("badges"); const data = useLoaderData(); const containerRef = useAnimateListEntry(".badges__nav-link"); return (
{data.badges.map((badge) => ( ))}

Badges by{" "} borzoic

{t("forYourEvent")}

); }