From 35e66d528c16eb5a42f6848d83e338ef0e2261f7 Mon Sep 17 00:00:00 2001 From: juhyojeong Date: Sat, 17 Aug 2024 15:51:50 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=8F=B4=EB=8D=94=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/constants/CasperCustom/customStep.tsx | 2 +- .../CasperCustom/{ => CasperCard}/CasperCardBackUI.tsx | 0 .../CasperCustom/{ => CasperCard}/CasperCardFrontUI.tsx | 0 .../CasperCustom/{ => CasperCard}/CasperFlipCard.tsx | 2 +- .../CasperCustom/{ => CasperCard}/MyCasperCardBack.tsx | 0 .../CasperCustom/{ => CasperCard}/MyCasperCardFront.tsx | 0 .../{ => CasperCustomPanel}/CasperCustomPanel.tsx | 0 .../{ => CasperCustomPanel}/CasperCustomPanelLayout.tsx | 0 .../{ => CasperCustomPanel}/CustomOptionImageItem.tsx | 0 .../{ => CasperCustomPanel}/EyesOptionImageItem.tsx | 0 .../CasperCustom/{ => CasperCustomPanel}/EyesPanel.tsx | 0 .../CasperCustom/{ => CasperCustomPanel}/SharedPanel.tsx | 0 .../{ => CustomProcess}/CasperCustomFinish.tsx | 6 +++--- .../{ => CustomProcess}/CasperCustomFinishing.tsx | 6 +++--- .../CasperCustom/{ => CustomProcess}/CasperCustomForm.tsx | 4 ++-- .../{ => CustomProcess}/CasperCustomProcess.tsx | 4 ++-- client/src/features/CasperCustom/index.tsx | 8 ++++---- .../src/features/CasperShowCase/TransitionCasperCards.tsx | 2 +- 18 files changed, 17 insertions(+), 17 deletions(-) rename client/src/features/CasperCustom/{ => CasperCard}/CasperCardBackUI.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCard}/CasperCardFrontUI.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCard}/CasperFlipCard.tsx (96%) rename client/src/features/CasperCustom/{ => CasperCard}/MyCasperCardBack.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCard}/MyCasperCardFront.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCustomPanel}/CasperCustomPanel.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCustomPanel}/CasperCustomPanelLayout.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCustomPanel}/CustomOptionImageItem.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCustomPanel}/EyesOptionImageItem.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCustomPanel}/EyesPanel.tsx (100%) rename client/src/features/CasperCustom/{ => CasperCustomPanel}/SharedPanel.tsx (100%) rename client/src/features/CasperCustom/{ => CustomProcess}/CasperCustomFinish.tsx (96%) rename client/src/features/CasperCustom/{ => CustomProcess}/CasperCustomFinishing.tsx (87%) rename client/src/features/CasperCustom/{ => CustomProcess}/CasperCustomForm.tsx (97%) rename client/src/features/CasperCustom/{ => CustomProcess}/CasperCustomProcess.tsx (94%) diff --git a/client/src/constants/CasperCustom/customStep.tsx b/client/src/constants/CasperCustom/customStep.tsx index 27599534..2047e1b5 100644 --- a/client/src/constants/CasperCustom/customStep.tsx +++ b/client/src/constants/CasperCustom/customStep.tsx @@ -3,7 +3,7 @@ import { EyesPanel, MouthPanel, StickerPanel, -} from "@/features/CasperCustom/CasperCustomPanel"; +} from "@/features/CasperCustom/CasperCustomPanel/CasperCustomPanel"; import { CUSTOM_OPTION } from "./casper"; export const CUSTOM_STEP_OPTION = { diff --git a/client/src/features/CasperCustom/CasperCardBackUI.tsx b/client/src/features/CasperCustom/CasperCard/CasperCardBackUI.tsx similarity index 100% rename from client/src/features/CasperCustom/CasperCardBackUI.tsx rename to client/src/features/CasperCustom/CasperCard/CasperCardBackUI.tsx diff --git a/client/src/features/CasperCustom/CasperCardFrontUI.tsx b/client/src/features/CasperCustom/CasperCard/CasperCardFrontUI.tsx similarity index 100% rename from client/src/features/CasperCustom/CasperCardFrontUI.tsx rename to client/src/features/CasperCustom/CasperCard/CasperCardFrontUI.tsx diff --git a/client/src/features/CasperCustom/CasperFlipCard.tsx b/client/src/features/CasperCustom/CasperCard/CasperFlipCard.tsx similarity index 96% rename from client/src/features/CasperCustom/CasperFlipCard.tsx rename to client/src/features/CasperCustom/CasperCard/CasperFlipCard.tsx index c3a7c52b..dd73c174 100644 --- a/client/src/features/CasperCustom/CasperFlipCard.tsx +++ b/client/src/features/CasperCustom/CasperCard/CasperFlipCard.tsx @@ -1,7 +1,7 @@ import { memo } from "react"; import { motion } from "framer-motion"; import { CASPER_CARD_SIZE, CASPER_SIZE_OPTION } from "@/constants/CasperCustom/casper"; -import { CasperCardType } from "../CasperShowCase/TransitionCasperCards"; +import { CasperCardType } from "@/features/CasperShowCase/TransitionCasperCards"; import { CasperCardBackUI } from "./CasperCardBackUI"; import { CasperCardFrontUI } from "./CasperCardFrontUI"; diff --git a/client/src/features/CasperCustom/MyCasperCardBack.tsx b/client/src/features/CasperCustom/CasperCard/MyCasperCardBack.tsx similarity index 100% rename from client/src/features/CasperCustom/MyCasperCardBack.tsx rename to client/src/features/CasperCustom/CasperCard/MyCasperCardBack.tsx diff --git a/client/src/features/CasperCustom/MyCasperCardFront.tsx b/client/src/features/CasperCustom/CasperCard/MyCasperCardFront.tsx similarity index 100% rename from client/src/features/CasperCustom/MyCasperCardFront.tsx rename to client/src/features/CasperCustom/CasperCard/MyCasperCardFront.tsx diff --git a/client/src/features/CasperCustom/CasperCustomPanel.tsx b/client/src/features/CasperCustom/CasperCustomPanel/CasperCustomPanel.tsx similarity index 100% rename from client/src/features/CasperCustom/CasperCustomPanel.tsx rename to client/src/features/CasperCustom/CasperCustomPanel/CasperCustomPanel.tsx diff --git a/client/src/features/CasperCustom/CasperCustomPanelLayout.tsx b/client/src/features/CasperCustom/CasperCustomPanel/CasperCustomPanelLayout.tsx similarity index 100% rename from client/src/features/CasperCustom/CasperCustomPanelLayout.tsx rename to client/src/features/CasperCustom/CasperCustomPanel/CasperCustomPanelLayout.tsx diff --git a/client/src/features/CasperCustom/CustomOptionImageItem.tsx b/client/src/features/CasperCustom/CasperCustomPanel/CustomOptionImageItem.tsx similarity index 100% rename from client/src/features/CasperCustom/CustomOptionImageItem.tsx rename to client/src/features/CasperCustom/CasperCustomPanel/CustomOptionImageItem.tsx diff --git a/client/src/features/CasperCustom/EyesOptionImageItem.tsx b/client/src/features/CasperCustom/CasperCustomPanel/EyesOptionImageItem.tsx similarity index 100% rename from client/src/features/CasperCustom/EyesOptionImageItem.tsx rename to client/src/features/CasperCustom/CasperCustomPanel/EyesOptionImageItem.tsx diff --git a/client/src/features/CasperCustom/EyesPanel.tsx b/client/src/features/CasperCustom/CasperCustomPanel/EyesPanel.tsx similarity index 100% rename from client/src/features/CasperCustom/EyesPanel.tsx rename to client/src/features/CasperCustom/CasperCustomPanel/EyesPanel.tsx diff --git a/client/src/features/CasperCustom/SharedPanel.tsx b/client/src/features/CasperCustom/CasperCustomPanel/SharedPanel.tsx similarity index 100% rename from client/src/features/CasperCustom/SharedPanel.tsx rename to client/src/features/CasperCustom/CasperCustomPanel/SharedPanel.tsx diff --git a/client/src/features/CasperCustom/CasperCustomFinish.tsx b/client/src/features/CasperCustom/CustomProcess/CasperCustomFinish.tsx similarity index 96% rename from client/src/features/CasperCustom/CasperCustomFinish.tsx rename to client/src/features/CasperCustom/CustomProcess/CasperCustomFinish.tsx index ef7f62c0..40f45451 100644 --- a/client/src/features/CasperCustom/CasperCustomFinish.tsx +++ b/client/src/features/CasperCustom/CustomProcess/CasperCustomFinish.tsx @@ -7,7 +7,9 @@ import { LotteryAPI } from "@/apis/lotteryAPI"; import CTAButton from "@/components/CTAButton"; import { MAX_APPLY } from "@/constants/CasperCustom/customStep"; import { DISSOLVE } from "@/constants/animation"; +import { SCROLL_MOTION } from "@/constants/animation"; import { COOKIE_KEY } from "@/constants/cookie"; +import { MyCasperCardFront } from "@/features/CasperCustom/CasperCard/MyCasperCardFront"; import useCasperCustomDispatchContext from "@/hooks/useCasperCustomDispatchContext"; import useCasperCustomStateContext from "@/hooks/useCasperCustomStateContext"; import useFetch from "@/hooks/useFetch"; @@ -17,9 +19,7 @@ import { GetShareLinkResponse } from "@/types/linkApi"; import { GetApplyCountResponse } from "@/types/lotteryApi"; import { saveDomImage } from "@/utils/saveDomImage"; import { writeClipboard } from "@/utils/writeClipboard"; -import { SCROLL_MOTION } from "../../constants/animation"; -import { Battery } from "./Battery"; -import { MyCasperCardFront } from "./MyCasperCardFront"; +import { Battery } from "../Battery"; import ArrowIcon from "/public/assets/icons/arrow.svg?react"; interface CasperCustomFinishProps { diff --git a/client/src/features/CasperCustom/CasperCustomFinishing.tsx b/client/src/features/CasperCustom/CustomProcess/CasperCustomFinishing.tsx similarity index 87% rename from client/src/features/CasperCustom/CasperCustomFinishing.tsx rename to client/src/features/CasperCustom/CustomProcess/CasperCustomFinishing.tsx index 0ae67a3c..344fa134 100644 --- a/client/src/features/CasperCustom/CasperCustomFinishing.tsx +++ b/client/src/features/CasperCustom/CustomProcess/CasperCustomFinishing.tsx @@ -2,11 +2,11 @@ import { useEffect, useState } from "react"; import { motion } from "framer-motion"; import { CASPER_SIZE_OPTION } from "@/constants/CasperCustom/casper"; import { DISSOLVE } from "@/constants/animation"; +import { SCROLL_MOTION } from "@/constants/animation"; +import { CasperFlipCard } from "@/features/CasperCustom/CasperCard/CasperFlipCard"; +import { CasperCardType } from "@/features/CasperShowCase/TransitionCasperCards"; import useCasperCustomStateContext from "@/hooks/useCasperCustomStateContext"; import useToast from "@/hooks/useToast"; -import { SCROLL_MOTION } from "../../constants/animation"; -import { CasperCardType } from "../CasperShowCase/TransitionCasperCards"; -import { CasperFlipCard } from "./CasperFlipCard"; interface CasperCustomFinishingProps { navigateNextStep: () => void; diff --git a/client/src/features/CasperCustom/CasperCustomForm.tsx b/client/src/features/CasperCustom/CustomProcess/CasperCustomForm.tsx similarity index 97% rename from client/src/features/CasperCustom/CasperCustomForm.tsx rename to client/src/features/CasperCustom/CustomProcess/CasperCustomForm.tsx index 0465f00a..b58d4d49 100644 --- a/client/src/features/CasperCustom/CasperCustomForm.tsx +++ b/client/src/features/CasperCustom/CustomProcess/CasperCustomForm.tsx @@ -6,14 +6,14 @@ import CTAButton from "@/components/CTAButton"; import TextField from "@/components/TextField"; import { CUSTOM_OPTION } from "@/constants/CasperCustom/casper"; import { DISSOLVE } from "@/constants/animation"; +import { SCROLL_MOTION } from "@/constants/animation"; import { COOKIE_KEY } from "@/constants/cookie"; +import { MyCasperCardFront } from "@/features/CasperCustom/CasperCard/MyCasperCardFront"; import useCasperCustomDispatchContext from "@/hooks/useCasperCustomDispatchContext"; import useCasperCustomStateContext from "@/hooks/useCasperCustomStateContext"; import useFetch from "@/hooks/useFetch"; import { CASPER_ACTION } from "@/types/casperCustom"; import { CasperInformationType, PostCasperResponse } from "@/types/lotteryApi"; -import { SCROLL_MOTION } from "../../constants/animation"; -import { MyCasperCardFront } from "./MyCasperCardFront"; interface CasperCustomFormProps { navigateNextStep: () => void; diff --git a/client/src/features/CasperCustom/CasperCustomProcess.tsx b/client/src/features/CasperCustom/CustomProcess/CasperCustomProcess.tsx similarity index 94% rename from client/src/features/CasperCustom/CasperCustomProcess.tsx rename to client/src/features/CasperCustom/CustomProcess/CasperCustomProcess.tsx index 79ec2c46..bc03fef7 100644 --- a/client/src/features/CasperCustom/CasperCustomProcess.tsx +++ b/client/src/features/CasperCustom/CustomProcess/CasperCustomProcess.tsx @@ -4,10 +4,10 @@ import CTAButton from "@/components/CTAButton"; import ListStep from "@/components/ListStep"; import { CUSTOM_OPTION_ARRAY } from "@/constants/CasperCustom/customStep"; import { DISSOLVE } from "@/constants/animation"; -import { MyCasperCardFront } from "@/features/CasperCustom/MyCasperCardFront"; +import { SCROLL_MOTION } from "@/constants/animation"; +import { MyCasperCardFront } from "@/features/CasperCustom/CasperCard/MyCasperCardFront"; import useCasperCustomStateContext from "@/hooks/useCasperCustomStateContext"; import { getCasperOptionDescription } from "@/utils/CasperCustom/getCasperOptionDescription"; -import { SCROLL_MOTION } from "../../constants/animation"; interface CasperCustomProcessProps { handleClickNextStep: () => void; diff --git a/client/src/features/CasperCustom/index.tsx b/client/src/features/CasperCustom/index.tsx index 3463c096..850e3430 100644 --- a/client/src/features/CasperCustom/index.tsx +++ b/client/src/features/CasperCustom/index.tsx @@ -1,4 +1,4 @@ -export { CasperCustomFinish } from "./CasperCustomFinish"; -export { CasperCustomFinishing } from "./CasperCustomFinishing"; -export { CasperCustomProcess } from "./CasperCustomProcess"; -export { CasperCustomForm } from "./CasperCustomForm"; +export { CasperCustomFinish } from "./CustomProcess/CasperCustomFinish"; +export { CasperCustomFinishing } from "./CustomProcess/CasperCustomFinishing"; +export { CasperCustomProcess } from "./CustomProcess/CasperCustomProcess"; +export { CasperCustomForm } from "./CustomProcess/CasperCustomForm"; diff --git a/client/src/features/CasperShowCase/TransitionCasperCards.tsx b/client/src/features/CasperShowCase/TransitionCasperCards.tsx index 6373f931..460e4731 100644 --- a/client/src/features/CasperShowCase/TransitionCasperCards.tsx +++ b/client/src/features/CasperShowCase/TransitionCasperCards.tsx @@ -2,9 +2,9 @@ import { useEffect, useRef, useState } from "react"; import { AnimatePresence, motion, useAnimation } from "framer-motion"; import { CASPER_CARD_SIZE, CASPER_SIZE_OPTION } from "@/constants/CasperCustom/casper"; import { CARD_TRANSITION } from "@/constants/CasperShowCase/showCase"; +import { CasperFlipCard } from "@/features/CasperCustom/CasperCard/CasperFlipCard"; import useLazyLoading from "@/hooks/useLazyLoading"; import { SelectedCasperIdxType } from "@/types/casperCustom"; -import { CasperFlipCard } from "../CasperCustom/CasperFlipCard"; export interface CasperCardType { id: number;