diff --git a/src/app/(withAuth)/courses/[courseId]/page.tsx b/src/app/(withAuth)/courses/[courseId]/page.tsx index 5e40d815..f4971160 100644 --- a/src/app/(withAuth)/courses/[courseId]/page.tsx +++ b/src/app/(withAuth)/courses/[courseId]/page.tsx @@ -71,7 +71,7 @@ const CoursePage: NextPage<{ params: { courseId: string } }> = ({ params }) => { {programIds.map((programId) => ( - + {programIdToName[programId]} diff --git a/src/app/(withAuth)/problems/[problemId]/CheckpointProblem.tsx b/src/app/(withAuth)/programs/[programId]/CheckpointProblem.tsx similarity index 100% rename from src/app/(withAuth)/problems/[problemId]/CheckpointProblem.tsx rename to src/app/(withAuth)/programs/[programId]/CheckpointProblem.tsx diff --git a/src/app/(withAuth)/problems/[problemId]/ExecutionResultProblem.tsx b/src/app/(withAuth)/programs/[programId]/ExecutionResultProblem.tsx similarity index 100% rename from src/app/(withAuth)/problems/[problemId]/ExecutionResultProblem.tsx rename to src/app/(withAuth)/programs/[programId]/ExecutionResultProblem.tsx diff --git a/src/app/(withAuth)/problems/[problemId]/StepProblem.tsx b/src/app/(withAuth)/programs/[programId]/StepProblem.tsx similarity index 100% rename from src/app/(withAuth)/problems/[problemId]/StepProblem.tsx rename to src/app/(withAuth)/programs/[programId]/StepProblem.tsx diff --git a/src/app/(withAuth)/problems/[problemId]/page.tsx b/src/app/(withAuth)/programs/[programId]/page.tsx similarity index 90% rename from src/app/(withAuth)/problems/[problemId]/page.tsx rename to src/app/(withAuth)/programs/[programId]/page.tsx index 31a773e8..e26f94f7 100644 --- a/src/app/(withAuth)/problems/[problemId]/page.tsx +++ b/src/app/(withAuth)/programs/[programId]/page.tsx @@ -12,8 +12,8 @@ import { CheckpointProblem } from './CheckpointProblem'; import { ExecutionResultProblem } from './ExecutionResultProblem'; import { StepProblem } from './StepProblem'; -const ProblemPage: NextPage<{ params: { problemId: string } }> = ({ params }) => { - const problemId = params.problemId; +const ProblemPage: NextPage<{ params: { programId: string } }> = ({ params }) => { + const programId = params.programId; // TODO: チェックポイントを取得する処理が実装できたら置き換える const checkPointLines = [1, 4]; @@ -28,8 +28,8 @@ const ProblemPage: NextPage<{ params: { problemId: string } }> = ({ params }) => }, []); useEffect(() => { - setProblemProgram(generateProgram(problemId, selectedLanguageId)); - }, [problemId, selectedLanguageId]); + setProblemProgram(generateProgram(programId, selectedLanguageId)); + }, [programId, selectedLanguageId]); const ProblemComponent: React.FC = () => { switch (step) { @@ -74,7 +74,7 @@ const ProblemPage: NextPage<{ params: { problemId: string } }> = ({ params }) => return (
- {programIdToName[problemId]} + {programIdToName[programId]}