Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions web/src/app/activity/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Activity page: runs and world records per day, then the latest runs, narrowed by style, track, lowest tier or
// world records only.
// Activity page: one board. Runs and world records per day, then the latest runs, narrowed by style, track,
// lowest tier or world records only.
import type { Metadata } from "next";
import { RecentRuns } from "@/features/activity/RecentRuns";
import { DailyTotals } from "@/features/dailyTotals/DailyTotals";
Expand All @@ -12,19 +12,21 @@ export const metadata: Metadata = {

export default function ActivityPage({ searchParams }: PageProps<"/activity">) {
return (
<Page className="gap-6">
<h1 className="text-3xl font-bold">Activity</h1>
<DailyTotals kind="runs" />
{searchParams.then(({ style, track, tier, show }) => (
<RecentRuns
params={{
style: typeof style === "string" ? style : undefined,
track: typeof track === "string" ? track : undefined,
tier: typeof tier === "string" ? tier : undefined,
show: typeof show === "string" ? show : undefined,
}}
/>
))}
<Page width="medium" className="gap-0">
<div className="border-border bg-surface overflow-hidden rounded-lg border">
<DailyTotals kind="runs" heading="Activity" plain />
{searchParams.then(({ style, track, tier, show, page }) => (
<RecentRuns
params={{
style: typeof style === "string" ? style : undefined,
track: typeof track === "string" ? track : undefined,
tier: typeof tier === "string" ? tier : undefined,
show: typeof show === "string" ? show : undefined,
page: typeof page === "string" ? page : undefined,
}}
/>
))}
</div>
</Page>
);
}
Loading