Skip to content

Commit

Permalink
(#73) ๐Ÿš€ feat: ์˜จ๋ณด๋”ฉ ๋ Œ๋”๋ง ์ด๋ฒคํŠธ ์—ฐ๋™
Browse files Browse the repository at this point in the history
  • Loading branch information
inaemon committed Nov 28, 2024
1 parent bb403fd commit 455b307
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions src/pages/Home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import CoachMark from "@/src/pages/Main/components/CoachMark";
import Main from '@/src/pages/Main/Main'; // ๋ฉ”์ธ ์ปดํฌ๋„ŒํŠธ

const HomePage = () => {
// ๋กœ์ง: init -> signup -> onboarding -> coachmark -> main
const [currentPage, setCurrentPage] = useState<'init' | 'signup' | 'onboarding' | 'coachmark' | 'main'>('init'); // ํŽ˜์ด์ง€ ์ƒํƒœ

useEffect(() => {
Expand All @@ -25,13 +26,13 @@ const HomePage = () => {
return (
<div>
{/* ์ดˆ๊ธฐ ํŽ˜์ด์ง€ */}
{currentPage === 'init' && <InitPage onComplete={() => setCurrentPage('signup')} />}
{currentPage === 'init' && <InitPage onComplete={() => setCurrentPage('onboarding')} />}

{/* ์˜จ๋ณด๋”ฉ ํŽ˜์ด์ง€ */}
{currentPage === 'onboarding' && <SignupPage3 />}
{currentPage === 'onboarding' && <SignupPage3 onComplete={() => setCurrentPage('coachmark')}/>}

{/* ์ฝ”์น˜๋งˆํฌ ํŽ˜์ด์ง€ */}
{currentPage === 'main' && <CoachMark />}
{currentPage === 'coachmark' && <CoachMark onClose={() => setCurrentPage('main')}/>}

{/* ๋ฉ”์ธ ํŽ˜์ด์ง€ */}
{currentPage === 'main' && <Main />}
Expand Down
12 changes: 6 additions & 6 deletions src/pages/Onboarding/Signup/SignupPage3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import signupZonePinkIcon from '../../../assets/svg/signup_zone_pink.svg';
import onboardingRookieIcon from "@/src/assets/webp/onboarding_welcome_rookie.webp";
import onboardingZoneBackgroundIcon from "@/src/assets/webp/onboarding_welcome_zone_background.webp";

const Page = () => {
// ์‹œ์ž‘ํ•˜๊ธฐ ๋ฒ„ํŠผ ์ด๋ฒคํŠธ
const handleStart = () => {

}

interface Props {
onComplete: () => void;
}

const Page = ({onComplete}: Props) => {

return (
<div className="relative justify-center items-center w-full h-screen ">
Expand Down Expand Up @@ -57,7 +57,7 @@ const Page = () => {
/>
<div className="flex justify-center items-center bg-main-50 border rounded-[8px] h-[48px] mb-[40px]">
<p className="text-md text-white font-semibold ">
<button onClick={handleStart}>Hitzone ์‹œ์ž‘ํ•˜๊ธฐ</button>
<button onClick={onComplete}>Hitzone ์‹œ์ž‘ํ•˜๊ธฐ</button>
</p>
</div>
</div>
Expand Down

0 comments on commit 455b307

Please sign in to comment.