import { Link, useFetcher } from "@remix-run/react"; import Meta from "~/lib/api/meta"; import { User } from "~/lib/api/user"; import { Nav, NavDropdown } from "react-bootstrap"; import { useTranslation } from "react-i18next"; import BaseNavbar from "~/components/nav/BaseNavbar"; export default function MainNavbar({ user }: { meta: Meta; user?: User }) { const fetcher = useFetcher(); const { t } = useTranslation(); const userMenu = user ? ( @{user.username}} align="end"> {t("navbar.view-profile")} {t("navbar.settings")} {t("navbar.log-out")} ) : ( {t("navbar.log-in")} ); return {userMenu}; }