From a3d9f86164413ecdc6dfa8bd5286cf48a4b6311c Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 11:39:18 +0900 Subject: [PATCH 01/13] =?UTF-8?q?feat:=20=EB=A0=88=EC=9D=B4=EC=8B=B1=20?= =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=EC=9D=91=EB=AA=A8=EC=B0=BD=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=95=84=EC=9A=94=ED=95=9C=20=EC=97=90=EC=85=8B=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/assets/customSelectDescription.svg | 4 + .../assets/customSelectDescriptionFocus.svg | 4 + Caecae/public/assets/racingGameEnterImage.svg | 962 ++++++++++++++++++ 3 files changed, 970 insertions(+) create mode 100644 Caecae/public/assets/customSelectDescription.svg create mode 100644 Caecae/public/assets/customSelectDescriptionFocus.svg create mode 100644 Caecae/public/assets/racingGameEnterImage.svg diff --git a/Caecae/public/assets/customSelectDescription.svg b/Caecae/public/assets/customSelectDescription.svg new file mode 100644 index 00000000..c0d230f1 --- /dev/null +++ b/Caecae/public/assets/customSelectDescription.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Caecae/public/assets/customSelectDescriptionFocus.svg b/Caecae/public/assets/customSelectDescriptionFocus.svg new file mode 100644 index 00000000..f2001d42 --- /dev/null +++ b/Caecae/public/assets/customSelectDescriptionFocus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Caecae/public/assets/racingGameEnterImage.svg b/Caecae/public/assets/racingGameEnterImage.svg new file mode 100644 index 00000000..55a6d3e0 --- /dev/null +++ b/Caecae/public/assets/racingGameEnterImage.svg @@ -0,0 +1,962 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From a153c04a1ee78ffb88d5d94469f7be69ce6392ec Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 14:47:28 +0900 Subject: [PATCH 02/13] =?UTF-8?q?fix:=20svg=20path=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/components/RacingGame/RacingGame.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Caecae/src/components/RacingGame/RacingGame.tsx b/Caecae/src/components/RacingGame/RacingGame.tsx index bb5d93d3..812a59dd 100644 --- a/Caecae/src/components/RacingGame/RacingGame.tsx +++ b/Caecae/src/components/RacingGame/RacingGame.tsx @@ -2,8 +2,8 @@ import React, { useRef, useState, useEffect } from "react"; import Lottie, { LottieRefCurrentProps } from "lottie-react"; import { motion, useAnimation, useMotionValue } from "framer-motion"; import animationGame315 from "@assets/animationGame315.json"; -import frontBackground from "../../../assets/frontBackground.svg"; -import rearBackground from "../../../assets/rearBackground.svg"; +import frontBackground from "@assets/frontBackground.svg"; +import rearBackground from "@assets/rearBackground.svg"; import { action, initRacingGameState, From 46ec18a55aca70132b03743836ad755db30aefd2 Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:02:10 +0900 Subject: [PATCH 03/13] =?UTF-8?q?feat:=20=EB=A0=88=EC=9D=B4=EC=8B=B1=20?= =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/RacingGame/RacingGamePage.tsx | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Caecae/src/pages/RacingGame/RacingGamePage.tsx diff --git a/Caecae/src/pages/RacingGame/RacingGamePage.tsx b/Caecae/src/pages/RacingGame/RacingGamePage.tsx new file mode 100644 index 00000000..c9497e57 --- /dev/null +++ b/Caecae/src/pages/RacingGame/RacingGamePage.tsx @@ -0,0 +1,31 @@ +import { useEffect } from "react"; +import { action as overlayAction } from "../../jobs/Overlay/OverlayWork"; +import { OverLay, OverLayContent } from "../../components/common/Overlay/index"; +import { store, useWork } from "../../shared/Hyundux"; +import RacingGame from "../../components/RacingGame/index"; +import { initRacingGameState, racingGameReducer } from "../../jobs/RacingGame/RacingGameWork"; +import SelectCustom from "./Enter/SelectCustom"; +import EnterComplete from "./Enter/EnterComplete"; +import PhoneNumberOverlayRacingGame from "../../components/PhoneNumberOverlay/PhoneNumberOverlayRacingGame"; + +const RacingGamePage = () => { + const [state, dispatch] = useWork(initRacingGameState, racingGameReducer); + + useEffect(() => { + if (state.gameStatus === "enterEvent") { + store.dispatch(overlayAction.toggleOverlay()); + } + }, [state.gameStatus]); + + return ( +
+ + } /> + } /> + } /> + + +
+ ); +}; +export default RacingGamePage; From 0d4c86e8dec984d8220962bbd82d4132070ff8dc Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:03:43 +0900 Subject: [PATCH 04/13] =?UTF-8?q?feat:=20RacingGameWork=EC=97=90=20enterEv?= =?UTF-8?q?ent=EB=9D=BC=EB=8A=94=20=EC=95=A1=EC=85=98=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/jobs/RacingGame/RacingGameWork.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Caecae/src/jobs/RacingGame/RacingGameWork.tsx b/Caecae/src/jobs/RacingGame/RacingGameWork.tsx index e61ac924..c4355e46 100644 --- a/Caecae/src/jobs/RacingGame/RacingGameWork.tsx +++ b/Caecae/src/jobs/RacingGame/RacingGameWork.tsx @@ -10,7 +10,7 @@ const aniMovingDistance = 11990; // state type interface RacingGamePayLoad { - gameStatus: "previous" | "playing" | "end"; + gameStatus: "previous" | "playing" | "end" | "enterEvent"; distance: number; } @@ -34,7 +34,9 @@ const racingGameReducer: Reducer = { return makePayLoad(state, { distance: (actionPayLoad.distance / aniMovingDistance) * km315, }); - } + }; + case "enterEvent": + return makePayLoad(state, { gameStatus: "enterEvent" }); default: return state; } @@ -64,6 +66,12 @@ const action = { }, }; }, + enterEvent: (): Action => { + return { + type: WORKFLOW_NAME, + actionName: "enterEvent", + }; + }, }; export { action, initRacingGameState, racingGameReducer }; From 1315f408ccdfef527861da8702750d1ff3660b2e Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:06:27 +0900 Subject: [PATCH 05/13] =?UTF-8?q?feat:=20=EB=A0=88=EC=9D=B4=EC=8B=B1=20?= =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=EC=B0=B8=EC=97=AC=20=ED=9B=84=20=EC=9D=91?= =?UTF-8?q?=EB=AA=A8=EB=B2=84=ED=8A=BC=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20?= =?UTF-8?q?=EC=9D=91=EB=AA=A8=20=EC=B0=BD=EC=9C=BC=EB=A1=9C=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=EB=90=98=EB=8F=84=EB=A1=9D=20=EA=B5=AC=ED=98=84=20(CC?= =?UTF-8?q?-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/RacingGame/RacingGame.tsx | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/Caecae/src/components/RacingGame/RacingGame.tsx b/Caecae/src/components/RacingGame/RacingGame.tsx index 812a59dd..4d83ac41 100644 --- a/Caecae/src/components/RacingGame/RacingGame.tsx +++ b/Caecae/src/components/RacingGame/RacingGame.tsx @@ -9,14 +9,15 @@ import { initRacingGameState, racingGameReducer, } from "../../jobs/RacingGame/RacingGameWork.tsx"; -import { useWork, store } from "../../shared/Hyundux/index.tsx"; +import { useWork, store, useExistState } from "../../shared/Hyundux/index.tsx"; import Link from "../../shared/Hyunouter/Link.tsx"; /** 게임 상태에 따라 다르게 보여지는 콘텐츠 */ const gameContent = ( gameStatus: string, distance: number, - handlePlayGame: () => void + handlePlayGame: () => void, + enterEvent: () => void ) => { switch (gameStatus) { case "previous": @@ -63,24 +64,40 @@ const gameContent = (
); + case "enterEvent": + return ( +
+
CASPER ELECTRIC
+
전력으로...!
+
+ +
+
+ ); default: return null; } @@ -125,7 +142,8 @@ const RacingGame: React.FC = () => { const rearRef = useRef(null); const [frontBackgroundWidth, setFrontImageWidth] = useState(0); const [rearBackgroundWidth, setRearBackgroundWidth] = useState(0); - const [state, dispatch] = useWork(initRacingGameState, racingGameReducer); + // const [state, dispatch] = useWork(initRacingGameState, racingGameReducer); + const state = useExistState(initRacingGameState); /** 모션 값을 사용하여 frontBackground의 x 위치 추적 */ const frontX = useMotionValue(0); @@ -137,7 +155,7 @@ const RacingGame: React.FC = () => { /** 이동한 km를 구하는 함수 */ const calculateDistance = (x: number) => { const totalDistance = Math.abs(x); - dispatch; + store.dispatch(action.updateDistance(totalDistance)); }; @@ -198,6 +216,10 @@ const RacingGame: React.FC = () => { } }; + const enterEvent = () => { + store.dispatch(action.enterEvent()); + } + /** 2개의 백그라운드 이미지의 width를 구하는 로직 */ useEffect(() => { const frontBackgroundImg = new Image(); @@ -262,10 +284,10 @@ const RacingGame: React.FC = () => { autoplay={false} className="absolute top-[485px] left-[250px] w-[350px] h-auto z-[3]" /> - {gameContent(state.gameStatus, state.distance, handlePlayGame)} + {gameContent(state.gameStatus, state.distance, handlePlayGame, enterEvent)} {gameMenu(state.gameStatus)} ); }; -export default RacingGame; +export default RacingGame; \ No newline at end of file From 51d9323fb8ab4982a18b5dc835b3cdb57b927d0b Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:07:36 +0900 Subject: [PATCH 06/13] =?UTF-8?q?feat:=20PhoneNumberOverlay=EB=A5=BC=202?= =?UTF-8?q?=EA=B0=80=EC=A7=80=20=EB=B2=84=EC=A0=84=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EA=B5=AC=ED=98=84=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....tsx => PhoneNumberOverlayFindingGame.tsx} | 22 +-- .../PhoneNumberOverlayRacingGame.tsx | 126 ++++++++++++++++++ .../components/PhoneNumberOverlay/index.tsx | 6 +- 3 files changed, 141 insertions(+), 13 deletions(-) rename Caecae/src/components/PhoneNumberOverlay/{PhoneNumberOverlay.tsx => PhoneNumberOverlayFindingGame.tsx} (88%) create mode 100644 Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlayRacingGame.tsx diff --git a/Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlay.tsx b/Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlayFindingGame.tsx similarity index 88% rename from Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlay.tsx rename to Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlayFindingGame.tsx index 3a60a2db..327c0fcc 100644 --- a/Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlay.tsx +++ b/Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlayFindingGame.tsx @@ -2,7 +2,7 @@ import { ChangeEventHandler, useEffect, useState } from "react"; import { action } from "../../jobs/Overlay/OverlayWork"; import { store } from "../../shared/Hyundux"; -const PhoneNumberOverlay = () => { +const PhoneNumberOverlayFindingGame = () => { const [timeLeft, setTimeLeft] = useState(3 * 60); // 3분을 초 단위로 변환 const [phoneNumber, setPhoneNumber] = useState(""); const [check, setCheck] = useState(false); @@ -77,30 +77,30 @@ const PhoneNumberOverlay = () => { return (
-
-

전화번호 입력

+
+

전화번호 입력

- + {timeToString()} 에 입력하지 않으면 미당첨으로 간주되어 자동 종료됩니다.
-

전화번호

+

전화번호

-

+

개인정보 동의

-
+

1. 개인정보의 처리 목적
@@ -122,14 +122,14 @@ const PhoneNumberOverlay = () => {

-
+
-

+

개인정보보호법에 따라 귀하의 개인정보를 다음과 같이 수집・이용하는데 동의합니다.

@@ -151,4 +151,4 @@ const PhoneNumberOverlay = () => { ); }; -export default PhoneNumberOverlay; +export default PhoneNumberOverlayFindingGame; diff --git a/Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlayRacingGame.tsx b/Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlayRacingGame.tsx new file mode 100644 index 00000000..28f6997d --- /dev/null +++ b/Caecae/src/components/PhoneNumberOverlay/PhoneNumberOverlayRacingGame.tsx @@ -0,0 +1,126 @@ +import { ChangeEventHandler, useEffect, useState } from "react"; +import { action } from "../../jobs/Overlay/OverlayWork"; +import { store } from "../../shared/Hyundux"; + +const PhoneNumberOverlayRacingGame = () => { + const [phoneNumber, setPhoneNumber] = useState(""); + const [check, setCheck] = useState(false); + const [enterable, setEnterable] = useState(false); + + const onPhoneNumberFieldChange: ChangeEventHandler = ( + event + ) => { + let number = ""; + const cleaned = event.target.value.replace(/\D/g, ""); + + // 유효성 검사 + if (cleaned.length <= 3) { + number = cleaned; + setPhoneNumber(number); + } else if (cleaned.length <= 7) { + number = `${cleaned.slice(0, 3)}-${cleaned.slice(3)}`; + setPhoneNumber(number); + } else if (cleaned.length <= 11) { + number = `${cleaned.slice(0, 3)}-${cleaned.slice(3, 7)}-${cleaned.slice( + 7, + 11 + )}`; + if (cleaned.length == 11) { + console.log(1234123); + } + setPhoneNumber(number); + } + }; + + const onCheckboxChange: ChangeEventHandler = () => { + setCheck((prev) => !prev); + }; + + useEffect(() => { + const number = phoneNumber.split("-").join(""); + if ( + check && + number.length == 11 && + number.slice(0, 3) === "010" && + enterable === false + ) { + setEnterable(true); + } else if (enterable === true) { + setEnterable(false); + } + }, [check, phoneNumber]); + + return ( +
+
+

전화번호 입력

+
+ 경품 수령을 위해 간단한 정보를 입력해 주세요. +
+
+

전화번호

+ +
+
+

+ 개인정보 동의 +

+
+
+

+ 1. 개인정보의 처리 목적 +
+ 개인정보를 다음의 목적을 위해 처리합니다. 처리한 개인정보는 + 다음의 목적 이외의 용도로는 사용되지 않으며 이용 목적이 변경될 + 시에는 사전 동의를 구할 예정입니다. +
+ 1. 개인정보의 처리 목적 +
+ 개인정보를 다음의 목적을 위해 처리합니다. 처리한 개인정보는 + 다음의 목적 이외의 용도로는 사용되지 않으며 이용 목적이 변경될 + 시에는 사전 동의를 구할 예정입니다. +
+ 1. 개인정보의 처리 목적 +
+ 개인정보를 다음의 목적을 위해 처리합니다. 처리한 개인정보는 + 다음의 목적 이외의 용도로는 사용되지 않으며 이용 목적이 변경될 + 시에는 사전 동의를 구할 예정입니다. +
+

+
+
+ +

+ 개인정보보호법에 따라 귀하의 개인정보를 다음과 같이 + 수집・이용하는데 동의합니다. +

+
+
+
+
+
{ + store.dispatch(action.nextPage()); + }} + className={`bg-[${ + enterable ? "#002C5F" : "#CCCCCC" + }] h-[12%] flex items-center justify-center`} + > +

응모 완료가기

+
+
+ ); +}; + +export default PhoneNumberOverlayRacingGame; diff --git a/Caecae/src/components/PhoneNumberOverlay/index.tsx b/Caecae/src/components/PhoneNumberOverlay/index.tsx index 7c88a489..d29787c5 100644 --- a/Caecae/src/components/PhoneNumberOverlay/index.tsx +++ b/Caecae/src/components/PhoneNumberOverlay/index.tsx @@ -1,2 +1,4 @@ -import PhoneNumberOverlay from "./PhoneNumberOverlay"; -export default PhoneNumberOverlay; +import PhoneNumberOverlayFindingGame from "./PhoneNumberOverlayFindingGame"; +import PhoneNumberOverlayRacingGame from "./PhoneNumberOverlayRacingGame"; + +export default { PhoneNumberOverlayFindingGame, PhoneNumberOverlayRacingGame }; From 79037434e0fdce54bb4be2dcd13cc88a2ec2a3fb Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:09:01 +0900 Subject: [PATCH 07/13] =?UTF-8?q?feat:=20=EB=A0=88=EC=9D=B4=EC=8B=B1=20?= =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=EA=B2=BD=ED=92=88=20=EC=9D=91=EB=AA=A8=20?= =?UTF-8?q?=EC=8B=9C=20=EA=B8=B0=EB=8C=80=ED=8F=89=20=EC=9E=91=EC=84=B1=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B5=AC=ED=98=84=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/RacingGame/Enter/SelectCustom.tsx | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 Caecae/src/pages/RacingGame/Enter/SelectCustom.tsx diff --git a/Caecae/src/pages/RacingGame/Enter/SelectCustom.tsx b/Caecae/src/pages/RacingGame/Enter/SelectCustom.tsx new file mode 100644 index 00000000..71ba9b2c --- /dev/null +++ b/Caecae/src/pages/RacingGame/Enter/SelectCustom.tsx @@ -0,0 +1,111 @@ +import { useState } from "react"; +import { action } from "../../../jobs/Overlay/OverlayWork"; +import { store } from "../../../shared/Hyundux"; + +interface Option { + id: number; + imgSrc: string; + title: string | JSX.Element; + description: string; +} + +const SelectCustom = () => { + const [selectedOption, setSelectedOption] = useState(null); + const [enterable, setEnterable] = useState(false); + const options: Option[] = [ + { id: 1, imgSrc: "/public/assets/racingGameCase1Image.svg", title: "Case 1. 공간활용의 기술", description: "캐스퍼 일렉트릭의 구석구석을\n활용해 많은 물건도 알차게 실을래요." }, + { id: 2, imgSrc: "/public/assets/racingGameCase2Image.svg", title: "Case 2. 레저의 정석", description: "캐스퍼 일렉트릭과 함께 방방곡곡\n누빌 레저 라이프가 기대되어요." }, + { id: 3, imgSrc: "/public/assets/racingGameCase3Image.svg", title: <>Case 3. 여행의 정석 Camping, description: "캐스퍼 일렉트릭과 함께 아웃도어\n활동을 쉽고 편안하게 할래요." }, + { id: 4, imgSrc: "/public/assets/racingGameCase4Image.svg", title: <>Case 4. 여행의 정석 Picnic, description: "캐스퍼 일렉트릭과 함께하는 즐거운\n피크닉이 기대되어요." }, + { id: 5, imgSrc: "/public/assets/racingGameCase5Image.svg", title: "Case 5. 펫 프렌들리", description: "캐스퍼 일렉트릭으로 반려동물과\n편안하고 안전한 여행을 할래요." }, + ]; + + const handleOptionSelect = (id: number) => { + setSelectedOption(id); + setEnterable(true); + }; + + return ( +
+
+
+ 기대되는 옵션 선택하고 추가 당첨 확률 높이기! +
+
+ 원하는 캐스퍼 일렉트릭 커스터마이징 옵션을 골라주세요. +
+ 캐스퍼 일렉트릭 당첨 시 선택한 옵션으로 받게 돼요. +
+
+ {options.map((option) => ( +
handleOptionSelect(option.id)} + > +
+ {`option${option.id}`} +
+
+ {`option${option.id}`} +
+
+ {option.title} +
+
+ {option.description} +
+
+
+
+ +
+
+ ))} +
+
+ +
{ + store.dispatch(action.nextPage()); + }} + className={`bg-[${ + enterable ? "#002C5F" : "#CCCCCC" + }] w-full h-[60px] flex items-center justify-center`} + > +

응모 완료가기

+
+
+ ); +}; + +export default SelectCustom; \ No newline at end of file From 33333dcfc13358f5b593cf61cf96f060c70af088 Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:09:35 +0900 Subject: [PATCH 08/13] =?UTF-8?q?feat:=20=EB=A0=88=EC=9D=B4=EC=8B=B1=20?= =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=EC=9D=91=EB=AA=A8=20=EC=8B=9C=20=EC=9D=91?= =?UTF-8?q?=EB=AA=A8=20=EC=99=84=EB=A3=8C=20=EC=B0=BD=20=EA=B5=AC=ED=98=84?= =?UTF-8?q?=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/RacingGame/Enter/EnterComplete.tsx | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Caecae/src/pages/RacingGame/Enter/EnterComplete.tsx diff --git a/Caecae/src/pages/RacingGame/Enter/EnterComplete.tsx b/Caecae/src/pages/RacingGame/Enter/EnterComplete.tsx new file mode 100644 index 00000000..5aa72313 --- /dev/null +++ b/Caecae/src/pages/RacingGame/Enter/EnterComplete.tsx @@ -0,0 +1,31 @@ +import { action } from "../../../jobs/Overlay/OverlayWork"; +import { store } from "../../../shared/Hyundux"; + +const EnterComplete = () => { + return ( + <> +
+
+ 응모 완료! +
+
+ 중복 응모시 등록된 점수 중 최고점수 1건만 추첨에 반영됩니다. +
+
+ racingGameEnterImage +
+
{ + store.dispatch(action.toggleOverlay()); + }} + > + 확인 +
+
+ + + ); +}; + +export default EnterComplete; From 8563a04fadfa89300376dc0a261ed0b004a9d770 Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:11:10 +0900 Subject: [PATCH 09/13] =?UTF-8?q?fix:=20PhoneNumberOverlay=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EC=88=98=EC=A0=95=EC=9C=BC=EB=A1=9C=20=EC=9D=B8?= =?UTF-8?q?=ED=95=9C=20FindingGamePage=20=EC=88=98=EC=A0=95=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/pages/FindingGame/FindingGamePage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Caecae/src/pages/FindingGame/FindingGamePage.tsx b/Caecae/src/pages/FindingGame/FindingGamePage.tsx index be883e47..28c9d48c 100644 --- a/Caecae/src/pages/FindingGame/FindingGamePage.tsx +++ b/Caecae/src/pages/FindingGame/FindingGamePage.tsx @@ -12,6 +12,7 @@ import FailContent from "./Enter/FailContent"; import PhoneNumberOverlay from "../../components/PhoneNumberOverlay"; import SuccessEnterContent from "./Enter/SuccessEnterContent"; import FindingGameResult from "../../components/FindingGame/FindingGameResult"; +import PhoneNumberOverlayFindingGame from "../../components/PhoneNumberOverlay/PhoneNumberOverlayFindingGame"; const FindingGamePage = () => { const [gameState, dispatch] = useWork( @@ -31,7 +32,7 @@ const FindingGamePage = () => {
} /> - } /> + } /> } /> } /> From 73c2aaf4d5de8341abfaae615458f609aa234f52 Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:12:24 +0900 Subject: [PATCH 10/13] =?UTF-8?q?feat:=20RacingGame=EC=97=90=20Index.tsx?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/components/RacingGame/index.tsx | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Caecae/src/components/RacingGame/index.tsx diff --git a/Caecae/src/components/RacingGame/index.tsx b/Caecae/src/components/RacingGame/index.tsx new file mode 100644 index 00000000..1142c7a2 --- /dev/null +++ b/Caecae/src/components/RacingGame/index.tsx @@ -0,0 +1,3 @@ +import RacingGame from "./RacingGame"; + +export default RacingGame; \ No newline at end of file From 0a06a68aff153475ef0d43febdf049a2fa9b1c8c Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:12:49 +0900 Subject: [PATCH 11/13] =?UTF-8?q?feat:=20Index.tsx=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Caecae/src/index.tsx b/Caecae/src/index.tsx index 8d0f3ae0..f31241e9 100644 --- a/Caecae/src/index.tsx +++ b/Caecae/src/index.tsx @@ -5,7 +5,7 @@ import EventInfoLandingPage from "./pages/EventInfoLanding/EventInfoLandingPage. import FindingGameLandingPage from "./pages/FindingGameLanding/FindingGameLandingPage.tsx"; import RacingGameLandingPage from "./pages/RacingGameLanding/RacingGameLandingPage.tsx"; import FindingGamePage from "./pages/FindingGame/FindingGamePage.tsx"; -import RacingGame from "./components/RacingGame/RacingGame.tsx"; +import RacingGamePage from "./pages/RacingGame/RacingGamePage.tsx"; // 임시 React component const App = () => { @@ -20,7 +20,7 @@ const App = () => { path="/findcaspergame#010643431936" element={} /> - } /> + } />
From 193f9b087755a1c8671a2626f8f257830a77635b Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:17:18 +0900 Subject: [PATCH 12/13] =?UTF-8?q?fix:=20Phonenumber=20overlay=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EC=9D=98=EC=A1=B4?= =?UTF-8?q?=EC=84=B1=20=EC=88=98=EC=A0=95=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/components/RacingGame/RacingGame.tsx | 5 ++--- Caecae/src/pages/FindingGame/FindingGamePage.tsx | 1 - Caecae/src/pages/RacingGame/RacingGamePage.tsx | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Caecae/src/components/RacingGame/RacingGame.tsx b/Caecae/src/components/RacingGame/RacingGame.tsx index 4d83ac41..e65217aa 100644 --- a/Caecae/src/components/RacingGame/RacingGame.tsx +++ b/Caecae/src/components/RacingGame/RacingGame.tsx @@ -6,10 +6,9 @@ import frontBackground from "@assets/frontBackground.svg"; import rearBackground from "@assets/rearBackground.svg"; import { action, - initRacingGameState, - racingGameReducer, + initRacingGameState } from "../../jobs/RacingGame/RacingGameWork.tsx"; -import { useWork, store, useExistState } from "../../shared/Hyundux/index.tsx"; +import { store, useExistState } from "../../shared/Hyundux/index.tsx"; import Link from "../../shared/Hyunouter/Link.tsx"; /** 게임 상태에 따라 다르게 보여지는 콘텐츠 */ diff --git a/Caecae/src/pages/FindingGame/FindingGamePage.tsx b/Caecae/src/pages/FindingGame/FindingGamePage.tsx index 28c9d48c..1cadd5af 100644 --- a/Caecae/src/pages/FindingGame/FindingGamePage.tsx +++ b/Caecae/src/pages/FindingGame/FindingGamePage.tsx @@ -9,7 +9,6 @@ import { OverLay, OverLayContent } from "../../components/common/Overlay/index"; import EnterContent from "./Enter/EnterContent"; import { store, useWork } from "../../shared/Hyundux"; import FailContent from "./Enter/FailContent"; -import PhoneNumberOverlay from "../../components/PhoneNumberOverlay"; import SuccessEnterContent from "./Enter/SuccessEnterContent"; import FindingGameResult from "../../components/FindingGame/FindingGameResult"; import PhoneNumberOverlayFindingGame from "../../components/PhoneNumberOverlay/PhoneNumberOverlayFindingGame"; diff --git a/Caecae/src/pages/RacingGame/RacingGamePage.tsx b/Caecae/src/pages/RacingGame/RacingGamePage.tsx index c9497e57..c95046ef 100644 --- a/Caecae/src/pages/RacingGame/RacingGamePage.tsx +++ b/Caecae/src/pages/RacingGame/RacingGamePage.tsx @@ -10,7 +10,7 @@ import PhoneNumberOverlayRacingGame from "../../components/PhoneNumberOverlay/Ph const RacingGamePage = () => { const [state, dispatch] = useWork(initRacingGameState, racingGameReducer); - + dispatch; useEffect(() => { if (state.gameStatus === "enterEvent") { store.dispatch(overlayAction.toggleOverlay()); From 8a85011a51ded0fa45a36231f1a4a8021d577325 Mon Sep 17 00:00:00 2001 From: minani-0621 Date: Mon, 12 Aug 2024 15:20:53 +0900 Subject: [PATCH 13/13] =?UTF-8?q?fix:=20tailwind=20=EC=88=9C=EC=84=9C?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20(CC-135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caecae/src/pages/FindingGame/FindingGamePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Caecae/src/pages/FindingGame/FindingGamePage.tsx b/Caecae/src/pages/FindingGame/FindingGamePage.tsx index 1cadd5af..b4a75b00 100644 --- a/Caecae/src/pages/FindingGame/FindingGamePage.tsx +++ b/Caecae/src/pages/FindingGame/FindingGamePage.tsx @@ -28,7 +28,7 @@ const FindingGamePage = () => { }, [gameState.showingAnswers.length]); return ( -
+
} /> } />