-
Notifications
You must be signed in to change notification settings - Fork 51
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
[손지은] week13 #501
The head ref may contain hidden characters: "part3-\uC190\uC9C0\uC740-week13"
[손지은] week13 #501
Conversation
…ithub-actions [Fix] delete merged branch github action
…y-Mission into part3-손지은-week13
@@ -0,0 +1,69 @@ | |||
import { createContext, useEffect, useState } from "react"; |
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.
next에서는 폴더를 기준으로 라우팅이 동작됩니다.
pages/folder/index.tsx 처럼 구분해주시는게 좋아보여요 👍
Routing 참고링크
import EyeOffIcon from "@/src/assets/img/eye-off.svg"; | ||
import EyeOnIcon from "@/src/assets/img/eye-on.svg"; | ||
import clsx from "clsx"; | ||
|
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.
네 input쪽은 지은님 말씀하신대로 분리가 필요해보입니다 👍
(의견 )(useInput으로 input 로직들만 훅으로 관리해도 좋을것같구요)
const [emailErrorMessage, setEmailErrorMessage] = useState(""); | ||
const [pwdErrorMessage, setPwdErrorMessage] = useState(""); | ||
const [pwdType, setPwdType] = useState("password"); | ||
const emailInput = useRef<any>(""); |
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.
타입 any로 선언하신 이유가 있을까요? (any는 지양합시다 👍 )
|
||
const handleInputChange = ( | ||
e: React.ChangeEvent<HTMLInputElement>, | ||
inputRef: React.MutableRefObject<string> |
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.
inputRef는 따로 파라미터로 받는 이유가 있을까요?
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.
onChange가 emailInput에서 일어나면 emailInput의 value를, pwdInput에서 일어나면 pwdInput의 value를 바꿔주기 위해서입니다.
} | ||
|
||
export async function getFolder({ id }: { id: number }) { | ||
const res = await fetch(`${API.baseURL}/users/${id}/folders`); |
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.
next자체 fetch를 제공해줍니다 추후 리팩토링이나 다음 과제 하실때 아래 링크 참고하시는걸 추천드려요 👍
nextjs Data Fetching
고생하셨습니다 지은님! |
요구사항
기본
주요 변경사항
스크린샷
배포주소 : https://jieun.vercel.app/signin
멘토에게