-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from chhw130/dev
PR : mainPage constructure
- Loading branch information
Showing
13 changed files
with
320 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const CloseIcon = () => { | ||
return ( | ||
<> | ||
<svg | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path d="M20 5L12 12.5L20 20" stroke="black" /> | ||
<path d="M4 5L12 12.5L4 20" stroke="black" /> | ||
</svg> | ||
</> | ||
); | ||
}; | ||
|
||
export default CloseIcon; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
"use client"; | ||
|
||
import { Flex, Progress } from "@chakra-ui/react"; | ||
import { useState } from "react"; | ||
import { useFunnel } from "../../utils/hooks/useFunnel"; | ||
import UserAgreementForm from "../form/UserAgreementForm"; | ||
import UserInfoForm from "../form/UserInfoForm"; | ||
import UserPhysicForm from "../form/UserPhysicForm"; | ||
|
||
export interface UserInfoType { | ||
userName: string; | ||
gender: string; | ||
age: number; | ||
height: number; | ||
weight: number; | ||
targetWeight: number; | ||
} | ||
|
||
const SignupTemplate = () => { | ||
const [progress, setProgress] = useState<number>(33.3); | ||
const [userInfo, setUserInfo] = useState<UserInfoType>({ | ||
userName: "", | ||
gender: "", | ||
age: 0, | ||
height: 0, | ||
weight: 0, | ||
targetWeight: 0, | ||
}); | ||
const { funnel, setFunnel } = useFunnel("userAgreement"); | ||
|
||
return ( | ||
<> | ||
<Progress | ||
bgColor={"#D9D9D9"} | ||
// colorScheme="black" | ||
size="xs" | ||
isAnimated={true} | ||
value={progress} | ||
/> | ||
|
||
<Flex | ||
flexDir={"column"} | ||
w={"100%"} | ||
h={"100vh"} | ||
pos={"relative"} | ||
maxW={"390px"} | ||
padding={"60px 22px"} | ||
margin={"0 auto"} | ||
alignItems={"center"} | ||
> | ||
{funnel === "userAgreement" && ( | ||
<UserAgreementForm setFunnel={setFunnel} setProgress={setProgress} /> | ||
)} | ||
{funnel === "userInfo" && ( | ||
<UserInfoForm | ||
setFunnel={setFunnel} | ||
setProgress={setProgress} | ||
setUserInfo={setUserInfo} | ||
/> | ||
)} | ||
{funnel === "userPhysics" && <UserPhysicForm userInfo={userInfo} />} | ||
</Flex> | ||
</> | ||
); | ||
}; | ||
|
||
export default SignupTemplate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.