From 73c33691d584d446e50999fe8a6d1d114a770fac Mon Sep 17 00:00:00 2001 From: Leo dev Date: Sat, 7 Feb 2026 22:41:29 +0100 Subject: [PATCH] Proper runs structure --- .../[runId]}/components/Editor.tsx | 0 .../[runId]}/components/FileTree.tsx | 0 .../[runId]}/components/ProfileCard.tsx | 0 .../[runId]}/components/RunChat.tsx | 0 .../[runId]}/components/RunTimer.tsx | 0 .../{run => runs/[runId]}/components/theme.ts | 0 src/app/{run => runs/[runId]}/page.tsx | 2 +- src/app/runs/components/LiveRunRow.tsx | 21 +++++++++++++++---- src/app/runs/page.tsx | 7 ++++--- 9 files changed, 22 insertions(+), 8 deletions(-) rename src/app/{run => runs/[runId]}/components/Editor.tsx (100%) rename src/app/{run => runs/[runId]}/components/FileTree.tsx (100%) rename src/app/{run => runs/[runId]}/components/ProfileCard.tsx (100%) rename src/app/{run => runs/[runId]}/components/RunChat.tsx (100%) rename src/app/{run => runs/[runId]}/components/RunTimer.tsx (100%) rename src/app/{run => runs/[runId]}/components/theme.ts (100%) rename src/app/{run => runs/[runId]}/page.tsx (97%) diff --git a/src/app/run/components/Editor.tsx b/src/app/runs/[runId]/components/Editor.tsx similarity index 100% rename from src/app/run/components/Editor.tsx rename to src/app/runs/[runId]/components/Editor.tsx diff --git a/src/app/run/components/FileTree.tsx b/src/app/runs/[runId]/components/FileTree.tsx similarity index 100% rename from src/app/run/components/FileTree.tsx rename to src/app/runs/[runId]/components/FileTree.tsx diff --git a/src/app/run/components/ProfileCard.tsx b/src/app/runs/[runId]/components/ProfileCard.tsx similarity index 100% rename from src/app/run/components/ProfileCard.tsx rename to src/app/runs/[runId]/components/ProfileCard.tsx diff --git a/src/app/run/components/RunChat.tsx b/src/app/runs/[runId]/components/RunChat.tsx similarity index 100% rename from src/app/run/components/RunChat.tsx rename to src/app/runs/[runId]/components/RunChat.tsx diff --git a/src/app/run/components/RunTimer.tsx b/src/app/runs/[runId]/components/RunTimer.tsx similarity index 100% rename from src/app/run/components/RunTimer.tsx rename to src/app/runs/[runId]/components/RunTimer.tsx diff --git a/src/app/run/components/theme.ts b/src/app/runs/[runId]/components/theme.ts similarity index 100% rename from src/app/run/components/theme.ts rename to src/app/runs/[runId]/components/theme.ts diff --git a/src/app/run/page.tsx b/src/app/runs/[runId]/page.tsx similarity index 97% rename from src/app/run/page.tsx rename to src/app/runs/[runId]/page.tsx index a464677..7548e97 100644 --- a/src/app/run/page.tsx +++ b/src/app/runs/[runId]/page.tsx @@ -8,7 +8,7 @@ import { File } from "lucide-react"; import Editor from "./components/Editor"; import useAction, { useActionInterval } from "@/hook/use-action"; import { getLiveRun } from "@/modules/live-run/actions"; -import ProblemCard from "../problems/components/ProblemCard"; +import ProblemCard from "@/app/problems/components/ProblemCard"; import ProfileCard from "./components/ProfileCard"; import { getProblem } from "@/modules/problems/actions"; diff --git a/src/app/runs/components/LiveRunRow.tsx b/src/app/runs/components/LiveRunRow.tsx index 5655586..08faad2 100644 --- a/src/app/runs/components/LiveRunRow.tsx +++ b/src/app/runs/components/LiveRunRow.tsx @@ -8,7 +8,8 @@ import formatTime from "@/lib/time-format"; import useAction from "@/hook/use-action"; import { getProblem } from "@/modules/problems/actions"; import Link from "next/link"; -import { LinkIcon } from "lucide-react"; +import { Eye, LinkIcon } from "lucide-react"; +import { Button } from "@/components/ui/button"; export default function LiveRunRow({ index, @@ -57,10 +58,22 @@ export default function LiveRunRow({ {/* Views */} - {isTop ? {run.views} : run.views} + + {isTop ? {run.views} : run.views} + - {/* Live status with category color */} - {run.category} + {/* Category */} + {run.category} + + {/* Actions */} + + + + + ); } diff --git a/src/app/runs/page.tsx b/src/app/runs/page.tsx index 3e9a71d..bac9078 100644 --- a/src/app/runs/page.tsx +++ b/src/app/runs/page.tsx @@ -49,9 +49,10 @@ export default function LiveRuns() { Runner Problem - Time - Views - Category + Time + Views + Category +