[김승석] Sprint11#319
Merged
withyj-codeit merged 23 commits intocodeit-bootcamp-frontend:Next-김승석from Mar 4, 2025
Hidden character warning
The head ref may contain hidden characters: "Next-\uae40\uc2b9\uc11d-sprint11"
Merged
Conversation
Collaborator
|
conflict 해결해주세요! |
kich555
approved these changes
Feb 5, 2025
Collaborator
There was a problem hiding this comment.
import React from "react";
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
const CustomInput: React.FC<InputProps> = (props) => {
return <input {...props} />;
};
export default CustomInput;이렇게props를 넘긴다면 보다 확장성 있겠죠?
src/pages/login/index.tsx
Outdated
| <img src="/assets/img/logo.svg" alt="로고" /> | ||
| </Link> | ||
| </div> | ||
| <form action=""> |
src/pages/login/index.tsx
Outdated
| </div> | ||
| </li> | ||
| <li> | ||
| <button className="btn round block large" disabled={true}> |
Comment on lines
+19
to
+26
| if (result) { | ||
| localStorage.removeItem("accessToken"); | ||
| localStorage.removeItem("refreshToken"); | ||
| localStorage.removeItem("user"); | ||
| setIsLoggedIn(false); | ||
| } else { | ||
| return; | ||
| } |
Collaborator
There was a problem hiding this comment.
if(!result) return;
localStorage.removeItem("accessToken");
localStorage.removeItem("refreshToken");
localStorage.removeItem("user");
setIsLoggedIn(false);이런식으로 early return기법을 사용해보는건 어떨까요
| import axios from "axios"; | ||
|
|
||
| const Instance = axios.create({ | ||
| baseURL: "https://panda-market-api.vercel.app", |
Collaborator
There was a problem hiding this comment.
baseURL같은건 env로 관리하는게 더 좋아보이네요
Comment on lines
+36
to
+47
| if (!email || !password) { | ||
| alert("모든 필드를 채워주세요."); | ||
| return; | ||
| } | ||
| if (!/\S+@\S+\.\S+/.test(email)) { | ||
| alert("유효한 이메일 주소를 입력해주세요."); | ||
| return; | ||
| } | ||
| if (password.length < 8) { | ||
| alert("비밀번호는 최소 8자 이상이어야 합니다."); | ||
| return; | ||
| } |
Collaborator
There was a problem hiding this comment.
validation로직은 submit함수에서 따로 추출하는게 더 좋아보이네요
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
요구사항
기본
회원가입
로그인
헤더
심화
멘토에게