From 9b2b73eab0a5fe24e1d5402261d4d9efe909d992 Mon Sep 17 00:00:00 2001 From: Kento Sato Date: Wed, 14 Feb 2024 17:37:46 +0900 Subject: [PATCH] Refactor import paths and add Variables component --- .../[courseId]/programs/[programId]/CheckpointProblem.tsx | 3 ++- .../courses/[courseId]/programs/[programId]/StepProblem.tsx | 3 ++- .../courses/[courseId]/programs/[programId]}/Variables.tsx | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) rename src/{components/organisms => app/(withAuth)/courses/[courseId]/programs/[programId]}/Variables.tsx (93%) diff --git a/src/app/(withAuth)/courses/[courseId]/programs/[programId]/CheckpointProblem.tsx b/src/app/(withAuth)/courses/[courseId]/programs/[programId]/CheckpointProblem.tsx index e54c3a88..e355212d 100644 --- a/src/app/(withAuth)/courses/[courseId]/programs/[programId]/CheckpointProblem.tsx +++ b/src/app/(withAuth)/courses/[courseId]/programs/[programId]/CheckpointProblem.tsx @@ -6,10 +6,11 @@ import { useRef } from 'react'; import { SyntaxHighlighter } from '../../../../../../components/organisms/SyntaxHighlighter'; import type { TurtleGraphicsHandle } from '../../../../../../components/organisms/TurtleGraphics'; import { TurtleGraphics } from '../../../../../../components/organisms/TurtleGraphics'; -import { Variables } from '../../../../../../components/organisms/Variables'; import type { ProblemType } from '../../../../../../types'; import { solveProblem } from '../../../../../lib/solveProblem'; +import { Variables } from './Variables'; + interface CheckpointProblemProps { problemProgram: string; selectedLanguageId: string; diff --git a/src/app/(withAuth)/courses/[courseId]/programs/[programId]/StepProblem.tsx b/src/app/(withAuth)/courses/[courseId]/programs/[programId]/StepProblem.tsx index 782030db..c26379d5 100644 --- a/src/app/(withAuth)/courses/[courseId]/programs/[programId]/StepProblem.tsx +++ b/src/app/(withAuth)/courses/[courseId]/programs/[programId]/StepProblem.tsx @@ -6,9 +6,10 @@ import { useRef } from 'react'; import { SyntaxHighlighter } from '../../../../../../components/organisms/SyntaxHighlighter'; import type { TurtleGraphicsHandle } from '../../../../../../components/organisms/TurtleGraphics'; import { TurtleGraphics } from '../../../../../../components/organisms/TurtleGraphics'; -import { Variables } from '../../../../../../components/organisms/Variables'; import { solveProblem } from '../../../../../lib/solveProblem'; +import { Variables } from './Variables'; + interface StepProblemProps { beforeCheckPointLine: number; currentCheckPointLine: number; diff --git a/src/components/organisms/Variables.tsx b/src/app/(withAuth)/courses/[courseId]/programs/[programId]/Variables.tsx similarity index 93% rename from src/components/organisms/Variables.tsx rename to src/app/(withAuth)/courses/[courseId]/programs/[programId]/Variables.tsx index fbec9445..d724f725 100644 --- a/src/components/organisms/Variables.tsx +++ b/src/app/(withAuth)/courses/[courseId]/programs/[programId]/Variables.tsx @@ -1,8 +1,8 @@ import { Box, Table, TableCaption, TableContainer, Tbody, Td, Th, Thead, Tr, VStack } from '@chakra-ui/react'; import React from 'react'; -import type { Character } from '../../app/lib/Character'; -import type { CharacterDirection } from '../../types'; +import type { CharacterDirection } from '../../../../../../types'; +import type { Character } from '../../../../../lib/Character'; interface VariablesProps { characters?: Character[];