refactor(playground): rename description to problem and update routes

This commit is contained in:
cfngc4594 2025-02-24 19:16:31 +08:00
parent 484bc6bc6e
commit 0ad1f24c7a
3 changed files with 5 additions and 5 deletions

View File

@ -2,11 +2,11 @@ import { FileTextIcon } from "lucide-react";
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
interface DescriptionLayoutProps { interface ProblemLayoutProps {
children: React.ReactNode; children: React.ReactNode;
} }
export default function DescriptionLayout({ children }: DescriptionLayoutProps) { export default function ProblemLayout({ children }: ProblemLayoutProps) {
return ( return (
<Tabs defaultValue="description" className="h-full flex flex-col"> <Tabs defaultValue="description" className="h-full flex flex-col">
<ScrollArea className="h-9 flex-none bg-muted px-1"> <ScrollArea className="h-9 flex-none bg-muted px-1">

View File

@ -5,18 +5,18 @@ import {
} from "@/components/ui/resizable"; } from "@/components/ui/resizable";
interface PlaygroundLayoutProps { interface PlaygroundLayoutProps {
description: React.ReactNode; problem: React.ReactNode;
workspace: React.ReactNode; workspace: React.ReactNode;
} }
export default function PlaygroundLayout({ export default function PlaygroundLayout({
description, problem,
workspace, workspace,
}: PlaygroundLayoutProps) { }: PlaygroundLayoutProps) {
return ( return (
<ResizablePanelGroup direction="horizontal" className="p-2.5 pt-0"> <ResizablePanelGroup direction="horizontal" className="p-2.5 pt-0">
<ResizablePanel defaultSize={50} className="border border-muted rounded-2xl"> <ResizablePanel defaultSize={50} className="border border-muted rounded-2xl">
{description} {problem}
</ResizablePanel> </ResizablePanel>
<ResizableHandle <ResizableHandle
withHandle withHandle