From 3b7b3b7e50d698e80880ccc085495a3af760c03c Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 9 Oct 2024 01:54:07 +0100 Subject: [PATCH] it builds locally now --- projects/website/Dockerfile | 8 ++++++-- .../src/app/(pages)/leaderboard/[...slug]/page.tsx | 4 ++-- projects/website/src/components/player/player-header.tsx | 2 +- projects/website/src/components/score/score-stats.tsx | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/projects/website/Dockerfile b/projects/website/Dockerfile index 47b3573..d7fd694 100644 --- a/projects/website/Dockerfile +++ b/projects/website/Dockerfile @@ -15,12 +15,16 @@ ENV NODE_ENV production ARG GIT_REV ENV GIT_REV=${GIT_REV} +# Copy the depends +COPY --from=depends /app/package.json* /app/bun.lockb* ./ +COPY --from=depends /app/node_modules ./node_modules + +# Build the common library COPY --from=depends /app/projects/common ./projects/common RUN bun i -g typescript RUN bun --filter '@ssr/common' build -COPY --from=depends /app/node_modules ./node_modules -COPY --from=depends /app/package.json* /app/bun.lockb* ./ +# Copy the website project COPY --from=depends /app/projects/website ./projects/website # Build the website diff --git a/projects/website/src/app/(pages)/leaderboard/[...slug]/page.tsx b/projects/website/src/app/(pages)/leaderboard/[...slug]/page.tsx index 5947ea1..3c2d7cb 100644 --- a/projects/website/src/app/(pages)/leaderboard/[...slug]/page.tsx +++ b/projects/website/src/app/(pages)/leaderboard/[...slug]/page.tsx @@ -1,11 +1,11 @@ -import { scoresaberService } from "@/common/service/impl/scoresaber"; import { Metadata, Viewport } from "next"; import { redirect } from "next/navigation"; import { Colors } from "@/common/colors"; import { getAverageColor } from "@/common/image-utils"; import { cache } from "react"; -import ScoreSaberLeaderboardScoresPageToken from "@/common/model/token/scoresaber/score-saber-leaderboard-scores-page-token"; import { LeaderboardData } from "@/components/leaderboard/leaderboard-data"; +import { scoresaberService } from "@ssr/common/service/impl/scoresaber"; +import ScoreSaberLeaderboardScoresPageToken from "@ssr/common/types/token/scoresaber/score-saber-leaderboard-scores-page-token"; const UNKNOWN_LEADERBOARD = { title: "ScoreSaber Reloaded - Unknown Leaderboard", diff --git a/projects/website/src/components/player/player-header.tsx b/projects/website/src/components/player/player-header.tsx index 8f76bcc..369da4d 100644 --- a/projects/website/src/components/player/player-header.tsx +++ b/projects/website/src/components/player/player-header.tsx @@ -5,10 +5,10 @@ import CountryFlag from "../country-flag"; import { Avatar, AvatarImage } from "../ui/avatar"; import ClaimProfile from "./claim-profile"; import PlayerStats from "./player-stats"; -import ScoreSaberPlayer from "@/common/model/player/impl/scoresaber-player"; import Tooltip from "@/components/tooltip"; import { ReactElement } from "react"; import PlayerTrackedStatus from "@/components/player/player-tracked-status"; +import ScoreSaberPlayer from "@ssr/common/types/player/impl/scoresaber-player"; /** * Renders the change for a stat. diff --git a/projects/website/src/components/score/score-stats.tsx b/projects/website/src/components/score/score-stats.tsx index 01f8360..745f8ee 100644 --- a/projects/website/src/components/score/score-stats.tsx +++ b/projects/website/src/components/score/score-stats.tsx @@ -1,11 +1,11 @@ -import ScoreSaberLeaderboardToken from "@/common/model/token/scoresaber/score-saber-leaderboard-token"; -import ScoreSaberScoreToken from "@/common/model/token/scoresaber/score-saber-score-token"; import { formatNumberWithCommas, formatPp } from "@/common/number-utils"; import { getScoreBadgeFromAccuracy } from "@/common/song-utils"; import { XMarkIcon } from "@heroicons/react/24/solid"; import clsx from "clsx"; import Tooltip from "@/components/tooltip"; import { ScoreBadge, ScoreBadges } from "@/components/score/score-badge"; +import ScoreSaberScoreToken from "@ssr/common/types/token/scoresaber/score-saber-score-token"; +import ScoreSaberLeaderboardToken from "@ssr/common/types/token/scoresaber/score-saber-leaderboard-token"; const badges: ScoreBadge[] = [ {