From d1188f5ea60a2a8b704a6c604668790d7c5f9604 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sun, 16 Mar 2025 12:05:59 +0800 Subject: [PATCH] chore(components): move features to components/features --- .../problems/[id]/@problem/@description/page.tsx | 2 +- .../(app)/problems/[id]/@problem/@solution/page.tsx | 2 +- .../(app)/problems/[id]/@workspace/@editor/page.tsx | 4 ++-- src/app/(app)/problems/[id]/layout.tsx | 2 +- src/{ => components}/features/playground/header.tsx | 0 .../playground/problem/description/footer.tsx | 0 .../features/playground/problem/solution/footer.tsx | 0 .../workspace/editor/components/copy-button.tsx | 0 .../workspace/editor/components}/footer.tsx | 0 .../workspace/editor/components/format-button.tsx | 0 .../workspace/editor/components}/header.tsx | 12 ++++++------ .../editor/components/language-selector.tsx | 0 .../workspace/editor/components/redo-button.tsx | 0 .../workspace/editor/components/reset-button.tsx | 0 .../workspace/editor/components/undo-button.tsx | 0 15 files changed, 11 insertions(+), 11 deletions(-) rename src/{ => components}/features/playground/header.tsx (100%) rename src/{ => components}/features/playground/problem/description/footer.tsx (100%) rename src/{ => components}/features/playground/problem/solution/footer.tsx (100%) rename src/{ => components}/features/playground/workspace/editor/components/copy-button.tsx (100%) rename src/{features/playground/workspace/editor => components/features/playground/workspace/editor/components}/footer.tsx (100%) rename src/{ => components}/features/playground/workspace/editor/components/format-button.tsx (100%) rename src/{features/playground/workspace/editor => components/features/playground/workspace/editor/components}/header.tsx (72%) rename src/{ => components}/features/playground/workspace/editor/components/language-selector.tsx (100%) rename src/{ => components}/features/playground/workspace/editor/components/redo-button.tsx (100%) rename src/{ => components}/features/playground/workspace/editor/components/reset-button.tsx (100%) rename src/{ => components}/features/playground/workspace/editor/components/undo-button.tsx (100%) diff --git a/src/app/(app)/problems/[id]/@problem/@description/page.tsx b/src/app/(app)/problems/[id]/@problem/@description/page.tsx index 63250f3..da3653d 100644 --- a/src/app/(app)/problems/[id]/@problem/@description/page.tsx +++ b/src/app/(app)/problems/[id]/@problem/@description/page.tsx @@ -2,7 +2,7 @@ import prisma from "@/lib/prisma"; import { notFound } from "next/navigation"; import { MdxRenderer } from "@/components/content/mdx-renderer"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; -import ProblemDescriptionFooter from "@/features/playground/problem/description/footer"; +import ProblemDescriptionFooter from "@/components/features/playground/problem/description/footer"; interface ProblemDescriptionPageProps { params: Promise<{ id: string }> diff --git a/src/app/(app)/problems/[id]/@problem/@solution/page.tsx b/src/app/(app)/problems/[id]/@problem/@solution/page.tsx index 37114d8..1d0e7b6 100644 --- a/src/app/(app)/problems/[id]/@problem/@solution/page.tsx +++ b/src/app/(app)/problems/[id]/@problem/@solution/page.tsx @@ -2,7 +2,7 @@ import prisma from "@/lib/prisma"; import { notFound } from "next/navigation"; import { MdxRenderer } from "@/components/content/mdx-renderer"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; -import ProblemSolutionFooter from "@/features/playground/problem/solution/footer"; +import ProblemSolutionFooter from "@/components/features/playground/problem/solution/footer"; interface ProblemSolutionPageProps { params: Promise<{ id: string }>; diff --git a/src/app/(app)/problems/[id]/@workspace/@editor/page.tsx b/src/app/(app)/problems/[id]/@workspace/@editor/page.tsx index 7a51cd8..a1ca844 100644 --- a/src/app/(app)/problems/[id]/@workspace/@editor/page.tsx +++ b/src/app/(app)/problems/[id]/@workspace/@editor/page.tsx @@ -1,7 +1,7 @@ import prisma from "@/lib/prisma"; import CodeEditor from "@/components/code-editor"; -import WorkspaceEditorHeader from "@/features/playground/workspace/editor/header"; -import WorkspaceEditorFooter from "@/features/playground/workspace/editor/footer"; +import WorkspaceEditorHeader from "@/components/features/playground/workspace/editor/components/header"; +import WorkspaceEditorFooter from "@/components/features/playground/workspace/editor/components/footer"; interface WorkspaceEditorProps { params: Promise<{ id: string }> diff --git a/src/app/(app)/problems/[id]/layout.tsx b/src/app/(app)/problems/[id]/layout.tsx index eec2f69..96cf12a 100644 --- a/src/app/(app)/problems/[id]/layout.tsx +++ b/src/app/(app)/problems/[id]/layout.tsx @@ -1,4 +1,4 @@ -import { PlaygroundHeader } from "@/features/playground/header"; +import { PlaygroundHeader } from "@/components/features/playground/header"; import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"; interface PlaygroundLayoutProps { diff --git a/src/features/playground/header.tsx b/src/components/features/playground/header.tsx similarity index 100% rename from src/features/playground/header.tsx rename to src/components/features/playground/header.tsx diff --git a/src/features/playground/problem/description/footer.tsx b/src/components/features/playground/problem/description/footer.tsx similarity index 100% rename from src/features/playground/problem/description/footer.tsx rename to src/components/features/playground/problem/description/footer.tsx diff --git a/src/features/playground/problem/solution/footer.tsx b/src/components/features/playground/problem/solution/footer.tsx similarity index 100% rename from src/features/playground/problem/solution/footer.tsx rename to src/components/features/playground/problem/solution/footer.tsx diff --git a/src/features/playground/workspace/editor/components/copy-button.tsx b/src/components/features/playground/workspace/editor/components/copy-button.tsx similarity index 100% rename from src/features/playground/workspace/editor/components/copy-button.tsx rename to src/components/features/playground/workspace/editor/components/copy-button.tsx diff --git a/src/features/playground/workspace/editor/footer.tsx b/src/components/features/playground/workspace/editor/components/footer.tsx similarity index 100% rename from src/features/playground/workspace/editor/footer.tsx rename to src/components/features/playground/workspace/editor/components/footer.tsx diff --git a/src/features/playground/workspace/editor/components/format-button.tsx b/src/components/features/playground/workspace/editor/components/format-button.tsx similarity index 100% rename from src/features/playground/workspace/editor/components/format-button.tsx rename to src/components/features/playground/workspace/editor/components/format-button.tsx diff --git a/src/features/playground/workspace/editor/header.tsx b/src/components/features/playground/workspace/editor/components/header.tsx similarity index 72% rename from src/features/playground/workspace/editor/header.tsx rename to src/components/features/playground/workspace/editor/components/header.tsx index 0996651..39e0396 100644 --- a/src/features/playground/workspace/editor/header.tsx +++ b/src/components/features/playground/workspace/editor/components/header.tsx @@ -1,11 +1,11 @@ import { cn } from "@/lib/utils"; import { EditorLanguage } from "@prisma/client"; -import CopyButton from "./components/copy-button"; -import RedoButton from "./components/redo-button"; -import UndoButton from "./components/undo-button"; -import ResetButton from "./components/reset-button"; -import FormatButton from "./components/format-button"; -import LanguageSelector from "./components/language-selector"; +import CopyButton from "./copy-button"; +import RedoButton from "./redo-button"; +import UndoButton from "./undo-button"; +import ResetButton from "./reset-button"; +import FormatButton from "./format-button"; +import LanguageSelector from "./language-selector"; interface WorkspaceEditorHeaderProps { templates: { language: EditorLanguage; template: string }[]; diff --git a/src/features/playground/workspace/editor/components/language-selector.tsx b/src/components/features/playground/workspace/editor/components/language-selector.tsx similarity index 100% rename from src/features/playground/workspace/editor/components/language-selector.tsx rename to src/components/features/playground/workspace/editor/components/language-selector.tsx diff --git a/src/features/playground/workspace/editor/components/redo-button.tsx b/src/components/features/playground/workspace/editor/components/redo-button.tsx similarity index 100% rename from src/features/playground/workspace/editor/components/redo-button.tsx rename to src/components/features/playground/workspace/editor/components/redo-button.tsx diff --git a/src/features/playground/workspace/editor/components/reset-button.tsx b/src/components/features/playground/workspace/editor/components/reset-button.tsx similarity index 100% rename from src/features/playground/workspace/editor/components/reset-button.tsx rename to src/components/features/playground/workspace/editor/components/reset-button.tsx diff --git a/src/features/playground/workspace/editor/components/undo-button.tsx b/src/components/features/playground/workspace/editor/components/undo-button.tsx similarity index 100% rename from src/features/playground/workspace/editor/components/undo-button.tsx rename to src/components/features/playground/workspace/editor/components/undo-button.tsx