diff --git a/app/routes/u.$identifier.tsx b/app/routes/u.$identifier.tsx index 81131a19d..dc92b579a 100644 --- a/app/routes/u.$identifier.tsx +++ b/app/routes/u.$identifier.tsx @@ -5,7 +5,6 @@ import type { UseDataFunctionReturn } from "@remix-run/react/dist/components"; import { countries } from "countries-list"; import { useTranslation } from "react-i18next"; import { z } from "zod"; -import { Main } from "~/components/Main"; import { SubNav, SubNavLink } from "~/components/SubNav"; import { db } from "~/db"; import { useUser } from "~/modules/auth"; @@ -93,9 +92,7 @@ export default function UserPageLayout() { )} -
- -
+ ); } diff --git a/app/routes/u.$identifier/edit.tsx b/app/routes/u.$identifier/edit.tsx index fc824726d..fd85fa9c2 100644 --- a/app/routes/u.$identifier/edit.tsx +++ b/app/routes/u.$identifier/edit.tsx @@ -16,6 +16,7 @@ import invariant from "tiny-invariant"; import { z } from "zod"; import { Button } from "~/components/Button"; import { Label } from "~/components/Label"; +import { Main } from "~/components/Main"; import { USER_BIO_MAX_LENGTH } from "~/constants"; import { db } from "~/db"; import { type User } from "~/db/types"; @@ -86,34 +87,36 @@ export default function UserEditPage() { const transition = useTransition(); return ( -
-
- - + + ))} + +
+ + - + {t("common:actions.save")} + + + ); } diff --git a/app/routes/u.$identifier/index.tsx b/app/routes/u.$identifier/index.tsx index 0d5c9bf0c..bdb5acd28 100644 --- a/app/routes/u.$identifier/index.tsx +++ b/app/routes/u.$identifier/index.tsx @@ -8,6 +8,7 @@ import { Badge } from "~/components/Badge"; import { TwitchIcon } from "~/components/icons/Twitch"; import { TwitterIcon } from "~/components/icons/Twitter"; import { YouTubeIcon } from "~/components/icons/YouTube"; +import { Main } from "~/components/Main"; import type { Unpacked } from "~/utils/types"; import { assertUnreachable } from "~/utils/types"; import { badgeExplanationText } from "../badges/$id"; @@ -23,39 +24,43 @@ export default function UserInfoPage() { const data = parentRoute.data as UserPageLoaderData; return ( -
-
- -

- {data.discordName} - #{data.discordDiscriminator} -

- {data.country ? ( -
- {data.country.emoji}{" "} - {data.country.name} +
+
+
+ +

+ {data.discordName} + + #{data.discordDiscriminator} + +

+ {data.country ? ( +
+ {data.country.emoji}{" "} + {data.country.name} +
+ ) : null} +
+ {data.twitch ? ( + + ) : null} + {data.twitter ? ( + + ) : null} + {data.youtubeId ? ( + + ) : null}
- ) : null} -
- {data.twitch ? ( - - ) : null} - {data.twitter ? ( - - ) : null} - {data.youtubeId ? ( - - ) : null}
+ + {data.bio &&
{data.bio}
}
- - {data.bio &&
{data.bio}
} -
+
); } diff --git a/app/routes/u.$identifier/results.tsx b/app/routes/u.$identifier/results.tsx index 4821dea2f..fd878b4c8 100644 --- a/app/routes/u.$identifier/results.tsx +++ b/app/routes/u.$identifier/results.tsx @@ -15,67 +15,69 @@ export default function UserResultsPage() { const data = parentRoute.data as UserPageLoaderData; return ( -
- - - - - - - - - - - - {data.results.map((result) => ( - - - - - - +
+
+
{t("results.placing")}{t("results.team")}{t("results.tournament")}{t("results.date")}{t("results.mates")}
{placementString(result.placement)}{result.teamName} - - {result.eventName} - - - {databaseTimestampToDate(result.startTime).toLocaleDateString( - i18n.language, - { - day: "numeric", - month: "numeric", - year: "numeric", - } - )} - -
    - {result.mates.map((player) => ( -
  • - {typeof player === "string" ? ( - player - ) : ( - - {" "} - {discordFullName(player)} - - )} -
  • - ))} -
-
+ + + + + + + - ))} - -
{t("results.placing")}{t("results.team")}{t("results.tournament")}{t("results.date")}{t("results.mates")}
-
+ + + {data.results.map((result) => ( + + {placementString(result.placement)} + {result.teamName} + + + {result.eventName} + + + + {databaseTimestampToDate(result.startTime).toLocaleDateString( + i18n.language, + { + day: "numeric", + month: "numeric", + year: "numeric", + } + )} + + +
    + {result.mates.map((player) => ( +
  • + {typeof player === "string" ? ( + player + ) : ( + + {" "} + {discordFullName(player)} + + )} +
  • + ))} +
+ + + ))} + + + + ); } diff --git a/app/styles/u.css b/app/styles/u.css index ace0955fc..677438ccb 100644 --- a/app/styles/u.css +++ b/app/styles/u.css @@ -126,6 +126,11 @@ font-weight: var(--bold); } +.u__results-main { + max-width: 52rem; + margin: 0 auto; +} + .u__results-section { overflow-x: auto; }