mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-29 22:58:18 -05:00
Hide seasons tab for now
This commit is contained in:
@@ -13,6 +13,7 @@ import { Main } from "~/components/Main";
|
||||
import { SubNav, SubNavLink } from "~/components/SubNav";
|
||||
import { db } from "~/db";
|
||||
import { countArtByUserId } from "~/features/art";
|
||||
import { currentSeason } from "~/features/mmr";
|
||||
import { userTopPlacements } from "~/features/top-search";
|
||||
import { findVods } from "~/features/vods";
|
||||
import { useTranslation } from "~/hooks/useTranslation";
|
||||
@@ -132,7 +133,10 @@ export default function UserPageLayout() {
|
||||
<Main>
|
||||
<SubNav>
|
||||
<SubNavLink to={userPage(data)}>{t("header.profile")}</SubNavLink>
|
||||
<SubNavLink to={userSeasonsPage({ user: data })}>Seasons</SubNavLink>
|
||||
{/* TODO: show also when not current season */}
|
||||
{currentSeason(new Date()) ? (
|
||||
<SubNavLink to={userSeasonsPage({ user: data })}>Seasons</SubNavLink>
|
||||
) : null}
|
||||
{isOwnPage && (
|
||||
<SubNavLink to={userEditProfilePage(data)} prefetch="intent">
|
||||
{t("actions.edit")}
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import { db } from "~/db";
|
||||
import { ordinalToSp } from "~/features/mmr";
|
||||
import { seasonAllMMRByUserId } from "~/features/mmr/queries/seasonAllMMRByUserId.server";
|
||||
import { seasonObject } from "~/features/mmr/season";
|
||||
import { currentSeason, seasonObject } from "~/features/mmr/season";
|
||||
import { userSkills } from "~/features/mmr/tiered.server";
|
||||
import { useIsMounted } from "~/hooks/useIsMounted";
|
||||
import { notFoundIfFalsy } from "~/utils/remix";
|
||||
@@ -55,6 +55,9 @@ export const loader = async ({ params, request }: LoaderArgs) => {
|
||||
? parsedSearchParams.data
|
||||
: seasonsSearchParamsSchema.parse({});
|
||||
|
||||
// TODO: handle it not being current season ("freshUserSkills" has ! that throws)
|
||||
notFoundIfFalsy(currentSeason(new Date()));
|
||||
|
||||
const user = notFoundIfFalsy(db.users.findByIdentifier(identifier));
|
||||
|
||||
const { tier } = (await userSkills()).userSkills[user.id] ?? {
|
||||
|
||||
Reference in New Issue
Block a user