From f645149acc37e2809cf4fc7abe05e2191bb8f162 Mon Sep 17 00:00:00 2001 From: Samuel Fang Date: Sat, 19 Jun 2021 21:19:42 +0800 Subject: [PATCH] Move error related files into features folder --- .../sicp => features/sicp/errors}/SicpErrorBoundary.tsx | 2 +- .../subcomponents => features/sicp/errors}/SicpErrors.tsx | 0 .../sicp/errors}/__tests__/SicpErrors.tsx | 0 .../sicp/errors}/__tests__/__snapshots__/SicpErrors.tsx.snap | 0 src/pages/sicp/Sicp.tsx | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename src/{pages/sicp => features/sicp/errors}/SicpErrorBoundary.tsx (90%) rename src/{pages/sicp/subcomponents => features/sicp/errors}/SicpErrors.tsx (100%) rename src/{pages/sicp/subcomponents => features/sicp/errors}/__tests__/SicpErrors.tsx (100%) rename src/{pages/sicp/subcomponents => features/sicp/errors}/__tests__/__snapshots__/SicpErrors.tsx.snap (100%) diff --git a/src/pages/sicp/SicpErrorBoundary.tsx b/src/features/sicp/errors/SicpErrorBoundary.tsx similarity index 90% rename from src/pages/sicp/SicpErrorBoundary.tsx rename to src/features/sicp/errors/SicpErrorBoundary.tsx index 1f40d23732..771d2685d3 100644 --- a/src/pages/sicp/SicpErrorBoundary.tsx +++ b/src/features/sicp/errors/SicpErrorBoundary.tsx @@ -1,6 +1,6 @@ import { Component, ErrorInfo, ReactNode } from 'react'; -import getSicpError, { SicpErrorType } from './subcomponents/SicpErrors'; +import getSicpError, { SicpErrorType } from './SicpErrors'; type Props = { children: ReactNode; diff --git a/src/pages/sicp/subcomponents/SicpErrors.tsx b/src/features/sicp/errors/SicpErrors.tsx similarity index 100% rename from src/pages/sicp/subcomponents/SicpErrors.tsx rename to src/features/sicp/errors/SicpErrors.tsx diff --git a/src/pages/sicp/subcomponents/__tests__/SicpErrors.tsx b/src/features/sicp/errors/__tests__/SicpErrors.tsx similarity index 100% rename from src/pages/sicp/subcomponents/__tests__/SicpErrors.tsx rename to src/features/sicp/errors/__tests__/SicpErrors.tsx diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpErrors.tsx.snap b/src/features/sicp/errors/__tests__/__snapshots__/SicpErrors.tsx.snap similarity index 100% rename from src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpErrors.tsx.snap rename to src/features/sicp/errors/__tests__/__snapshots__/SicpErrors.tsx.snap diff --git a/src/pages/sicp/Sicp.tsx b/src/pages/sicp/Sicp.tsx index 985f5e8a18..d2a335241f 100644 --- a/src/pages/sicp/Sicp.tsx +++ b/src/pages/sicp/Sicp.tsx @@ -9,8 +9,8 @@ import Constants from 'src/commons/utils/Constants'; import { resetWorkspace, toggleUsingSubst } from 'src/commons/workspace/WorkspaceActions'; import { parseArr, ParseJsonError } from 'src/features/sicp/parser/ParseJson'; -import SicpErrorBoundary from './SicpErrorBoundary'; -import getSicpError, { SicpErrorType } from './subcomponents/SicpErrors'; +import SicpErrorBoundary from '../../features/sicp/errors/SicpErrorBoundary'; +import getSicpError, { SicpErrorType } from '../../features/sicp/errors/SicpErrors'; import SicpIndexPage from './subcomponents/SicpIndexPage'; type SicpProps = RouteComponentProps<{}>;