-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/signup #4
Merged
Merged
Feat/signup #4
Changes from 15 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
237afb9
remove: css νμΌμ page.tsxμ κ°μ κ²½λ‘μ λ£κΈ°
Jetom88 e988717
remove: css νμΌ μμΉ λ³κ²½μ λ°λ₯Έ κ²½λ‘ μμ
Jetom88 424aa5d
feat: pink80 μμ μΆκ°
Jetom88 c128a02
feat: νμκ°μ
page μΆκ°
Jetom88 62bc440
feat: λλ€μ ui μΆκ°
Jetom88 81c5f15
feat: zod, react-hook-form λΌμ΄λΈλ¬λ¦¬ μΆκ°, schema μΆκ°
Jetom88 ea5b9da
feat: νμκ°μ
μ ν¨μ± κ²μ¬ λ‘μ§ μΆκ° λ° λ‘컬μ€ν 리μ§μ μ μ₯
Jetom88 c483e05
feat: λ‘κ·ΈμΈ νμ΄μ§ ꡬν
Jetom88 86bc210
feat: λ‘κ·ΈμΈ μ 보 λ‘컬 μ€ν 리μ§μ μ μ₯
Jetom88 7474f5d
feat: my νμ΄μ§ νμ€ λͺ©ν λ‘컬μ€ν 리μ§μ μ μ₯
Jetom88 673dcf4
fix: μμ΄λλ λΉλ°λ²νΈκ° μΌμΉνμ§ μμλ νμ
보μ΄κ² λ‘μ§ μμ
Jetom88 0d65aa4
review: sonarCloudμμ λνλ μ»΄ν¬λνΈμμ λλ¬Έμλ‘ μμν΄μΌνλ€λ κ·μΉ μμ λ° spanμ buttonμΌλ‘ μμ
Jetom88 5097967
review: λ‘컬μ€ν λ¦¬μ§ κ΄λ¦¬λ₯Ό νμ
μΌλ‘ νμ©
Jetom88 9d2e294
review: λμΉ localStorage λ‘μ§ μΆκ°
Jetom88 b57c4ac
review: login pageλ₯Ό κΈ°λ₯κ³Ό λ μ΄μμμΌλ‘ μ½λ λΆν
Jetom88 60783b4
review: zodλ₯Ό μ¬μ©ν΄μ text propsλ₯Ό nullable νμ
μΌλ‘ μμ
Jetom88 60cd215
review: immer λΌμ΄λΈλ¬λ¦¬λ₯Ό νμ©ν΄ λΆλ³μ± κ΄λ¦¬ λ° μν λ³΅μ¬ μμ
μ€μ
Jetom88 ff71deb
feat: immer λΌμ΄λΈλ¬λ¦¬ μΆκ°
Jetom88 686f08f
review: λΆνμν μ£Όμ μ κ±°
Jetom88 e1951ee
fix: νμν stateλ§ μ¬μ©ν΄ 리λ λλ§μ μ΅μν νλ λ‘μ§ μΆκ°
Jetom88 760df72
review: 보νΈκ΅¬λ¬ΈμΌλ‘ 리ν©ν λ§
Jetom88 18f1511
review: zustandλ₯Ό atomic ν¨ν΄μΌλ‘ λ§λ€κΈ° μν΄ λ³μλͺ
μμ
Jetom88 128f8fb
review: localStorageμ get,set,removeλ₯Ό class νμμΌλ‘ λ°κΎΌ ν μ μ©
Jetom88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,164 @@ | ||
"use client"; | ||
|
||
import { flexSprinklesFc } from "@/app/components/common/utils/flex"; | ||
import { signupContainer, signupWrapper } from "./signup.css"; | ||
import { inputStyle } from "@/app/styles/common/input.css"; | ||
import { caption, heading2, regular, semiBold } from "@/app/styles/font.css"; | ||
import { paddingSprinkles } from "@/app/styles/padding.css"; | ||
import { colors, pink80 } from "@/app/styles/colors.css"; | ||
import Image from "next/image"; | ||
import { pointer } from "@/app/styles/global.css"; | ||
import { useRouter } from "next/navigation"; | ||
import Button from "@/app/components/common/Button"; | ||
import { useForm } from "react-hook-form"; | ||
import { signupSchema } from "@/app/types/signupSchema"; | ||
import { z } from "zod"; | ||
import { zodResolver } from "@hookform/resolvers/zod"; | ||
import { useState } from "react"; | ||
import Popup from "@/app/components/common/Popup"; | ||
import { localStorageSetItem } from "@/app/types/localStorageSchema"; | ||
|
||
const Page = () => { | ||
const router = useRouter(); | ||
const [submit, setSubmit] = useState(false); | ||
|
||
const { | ||
register, | ||
handleSubmit, | ||
formState: { errors, isValid }, | ||
} = useForm<z.infer<typeof signupSchema>>({ | ||
resolver: zodResolver(signupSchema), | ||
mode: "onChange", | ||
defaultValues: { | ||
id: "", | ||
password: "", | ||
confirmPassword: "", | ||
nickname: "", | ||
}, | ||
}); | ||
|
||
const onSubmit = (data: z.infer<typeof signupSchema>) => { | ||
if (data) { | ||
setSubmit(true); | ||
localStorageSetItem("signup", data); | ||
} | ||
}; | ||
|
||
return ( | ||
<> | ||
{submit && ( | ||
<Popup text="νμκ°μ μ΄ μλ£λμμ΅λλ€."> | ||
<Button | ||
width="115px" | ||
text="νμΈ" | ||
onClick={() => { | ||
router.push("/"); | ||
}} | ||
color={colors.white} | ||
background={colors.primary} | ||
/> | ||
</Popup> | ||
)} | ||
<section className={signupWrapper}> | ||
<article className={signupContainer}> | ||
<div> | ||
<div className={`${paddingSprinkles({ paddingBottom: "s32" })} ${pointer}`}> | ||
<Image | ||
src="/svgs/prev.svg" | ||
alt="back" | ||
width={17} | ||
height={21} | ||
onClick={() => { | ||
router.push("/"); | ||
}} | ||
/> | ||
</div> | ||
|
||
<div className={paddingSprinkles({ paddingBottom: "s32" })}> | ||
<h3 className={`${semiBold} ${heading2}`}> | ||
νμκ°μ μ | ||
<br /> μμ ν κΉμ? | ||
</h3> | ||
</div> | ||
</div> | ||
|
||
<form | ||
onSubmit={handleSubmit(onSubmit)} | ||
className={flexSprinklesFc({ flexDirection: "column", gap: "32px" })} | ||
> | ||
<div className={flexSprinklesFc({ flexDirection: "column", gap: "8px" })}> | ||
<div> | ||
<p className={`${caption} ${regular} ${paddingSprinkles({ paddingBottom: "s4" })}`}> | ||
μμ΄λ<span className={`${pink80}`}>*</span> | ||
</p> | ||
<input placeholder="μμ΄λ" className={inputStyle} {...register("id")} maxLength={10} /> | ||
|
||
<p className={`${paddingSprinkles({ paddingTop: "s4" })} ${caption} ${pink80}`}> | ||
{errors.id?.message} | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<p className={`${caption} ${regular} ${paddingSprinkles({ paddingBottom: "s4" })}`}> | ||
λΉλ°λ²νΈ<span className={`${pink80}`}>*</span> | ||
</p> | ||
<input | ||
type="password" | ||
placeholder="λΉλ°λ²νΈ" | ||
className={inputStyle} | ||
{...register("password")} | ||
maxLength={12} | ||
/> | ||
|
||
<p className={`${paddingSprinkles({ paddingTop: "s4" })} ${caption} ${pink80}`}> | ||
{errors.password?.message} | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<p className={`${caption} ${regular} ${paddingSprinkles({ paddingBottom: "s4" })}`}> | ||
λΉλ°λ²νΈ νμΈ<span className={`${pink80}`}>*</span> | ||
</p> | ||
<input | ||
type="password" | ||
placeholder="λΉλ°λ²νΈ νμΈ" | ||
className={inputStyle} | ||
{...register("confirmPassword")} | ||
maxLength={12} | ||
/> | ||
|
||
<p className={`${paddingSprinkles({ paddingTop: "s4" })} ${caption} ${pink80}`}> | ||
{errors.confirmPassword?.message} | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<p className={`${caption} ${regular} ${paddingSprinkles({ paddingBottom: "s4" })}`}> | ||
λλ€μ<span className={`${pink80}`}>*</span> | ||
</p> | ||
<input placeholder="λλ€μ" className={inputStyle} {...register("nickname")} /> | ||
|
||
<p className={`${paddingSprinkles({ paddingTop: "s4" })} ${caption} ${pink80}`}> | ||
{errors.nickname?.message} | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<Button | ||
text="κ°μ νκΈ°" | ||
width="100%" | ||
background={isValid ? colors.point : colors.gray200} | ||
color={colors.white} | ||
fontSize="12px" | ||
disabled={!isValid} | ||
/> | ||
</div> | ||
</form> | ||
</article> | ||
</section> | ||
</> | ||
); | ||
}; | ||
|
||
export default Page; |
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,19 @@ | ||
import { style } from "@vanilla-extract/css"; | ||
|
||
export const signupWrapper = style([ | ||
{ | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "flex-start", | ||
justifyContent: "space-between", | ||
height: "100vh", | ||
padding: "85px 36px 104px 36px", | ||
}, | ||
]); | ||
|
||
export const signupContainer = style({ | ||
display: "flex", | ||
flexDirection: "column", | ||
width: "100%", | ||
height: "100%", | ||
}); |
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
File renamed without changes.
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zodλ₯Ό μ¬μ©νλ©΄ nullish νμ μΌλ‘ ννν μλ μμκ² κ°μμ
νμ μλ nullish(optional), nullableκ°μ ννμ νμ λ μμΌλ νμ©ν΄λ³΄μλ건 μ΄λ¨κΉμ