mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-11 21:29:09 -05:00
* Clean away prisma migrations
* Way to migrate WIP
* SQLite3 seeding script initial
* Fetch tournament data in loader
* CheckinActions new loader data model
* Virtual banner text color columns
* Logged in user
* Count teams
* ownTeam
* Map pool tab fully working
* Teams tab
* Fix timestamp default
* Register page
* Manage team page
* Camel case checkedInTimestamp
* Clean slate
* Add .nvmrc
* Add favicon
* Package lock file version 2
* Update tsconfig
* Add Tailwind
* Add StrictMode
* Add background color
* Auth without DB
* Revert "Add Tailwind"
This reverts commit 204713c602.
* Auth with DB
* Switch back to tilde absolute import
* Import layout
* Camel case for database columns
* Move auth routes to folder
* User popover links working
* Import linters
* User page initial
* User edit page with country
* Script to delete db files before migration in dev
* Remove "youtubeName" column
* Correct avatar size on desktop
* Fix SubNav not spanning the whole page
* Remove duplicate files
* Update README
51 lines
1.6 KiB
TypeScript
51 lines
1.6 KiB
TypeScript
import clsx from "clsx";
|
|
import { Fragment } from "react";
|
|
import { Link } from "@remix-run/react";
|
|
import { navItemsGrouped } from "~/constants";
|
|
|
|
export function MobileMenu({
|
|
expanded,
|
|
closeMenu,
|
|
}: {
|
|
expanded: boolean;
|
|
closeMenu: () => void;
|
|
}) {
|
|
return (
|
|
<div className={clsx("layout__mobile-nav", { expanded })}>
|
|
<div className="layout__mobile-nav__top-action">
|
|
{/* <SearchInput /> */}
|
|
</div>
|
|
<div className="layout__mobile-nav__links">
|
|
{navItemsGrouped.map((navGroup) => (
|
|
<Fragment key={navGroup.title}>
|
|
<div className="layout__mobile-nav__group-title">
|
|
{navGroup.title}
|
|
</div>
|
|
{navGroup.items.map((navItem, i) => (
|
|
<Link
|
|
key={navItem.name}
|
|
className={clsx("layout__mobile-nav__link", {
|
|
first: i === 0,
|
|
last: i + 1 === navGroup.items.length,
|
|
})}
|
|
to={navItem.disabled ? "/" : navItem.url ?? navItem.name}
|
|
onClick={closeMenu}
|
|
data-cy={`mobile-nav-link-${navItem.name}`}
|
|
>
|
|
<img
|
|
className={clsx("layout__mobile-nav__link__icon", {
|
|
disabled: navItem.disabled,
|
|
})}
|
|
src={`/img/layout/${navItem.name.replace(" ", "")}.webp`}
|
|
alt={navItem.name}
|
|
/>
|
|
<div>{navItem.displayName ?? navItem.name}</div>
|
|
</Link>
|
|
))}
|
|
</Fragment>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|