-
Notifications
You must be signed in to change notification settings - Fork 46
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
[이준희] sprint11 #324
The head ref may contain hidden characters: "Next-\uC774\uC900\uD76C-sprint11"
[이준희] sprint11 #324
Conversation
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.
고생하셨습니다.
values.tags.length > 0; | ||
|
||
const handleChange = (name: string, value: any) => { | ||
setValues((initialValues) => ({ |
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.
value를 업데이트 할때는 initialValues 보다는 prev나 prevState 같은 단어를 사용해주시는 것이 조금 더 직관적일 것 같습니다.
e.preventDefault(); | ||
const formData = new FormData(); | ||
formData.append("name", values.name); | ||
formData.append("favorite", values.favoriteCount.toString()); | ||
formData.append("description", values.description); | ||
formData.append("price", values.price.toString()); | ||
if (values.images) { | ||
values.images.forEach((image, index) => { | ||
formData.append(`images[${index}]`, image); | ||
}); | ||
} | ||
formData.append("tags", JSON.stringify(values.tags)); |
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.
로직 간에 개행으로 구분해주시면 가독성에 도움이 될 것 같습니다.
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.
파일명에는 띄어쓰기를 공백으로 넣기보다는 _를 활용해서 표기하는 것을 추천드립니다.
@@ -8,6 +8,7 @@ import heart from "@/public/svgs/ic_heart (1).svg"; | |||
import defaultImage from "@/public/pngs/noImage.png"; | |||
import searchIcon from "@/public/svgs/ic_search.svg"; | |||
import { getArticles } from "@/lib/api"; | |||
import debounce from "@/lib/utils/debounce"; |
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.
debounce 유틸 함수로 만들어주신거 좋네요.
return 10; | ||
} | ||
}; | ||
import getPageSize from "@/lib/utils/getPageSize"; | ||
|
||
function AllItems() { | ||
const [orderBy, setOrderBy] = useState<string>("recent"); |
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.
string 타입 대신에 들어가는 문자열을 타입으로 사용해보는 것은 어떨까요?
], | ||
formats: ["image/avif", "image/webp"], |
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.
차세대 이미지 형식 적용해주신 점 좋네요.
}; | ||
|
||
export default function App({ Component, pageProps }: AppPropsWithLayout) { | ||
const getLayout = |
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.
getLayout 활용하신거 좋네요.
const isLoginEnabled = (): boolean => { | ||
return validateEmail(email) && password.length >= 8; | ||
}; |
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.
이건 함수 말고 변수로 만들어도 될 것 같습니다.
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.
폼의 형식이 비슷해서 login에서 사용되는 함수들을 공통 훅으로 분리해서 같이 사용할 수 있게 만들어보셔도 좋을 것 같습니다.
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
background-color: #e6f2ff; |
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.
여기 컬러 변수가 빠져있네요.
remotePatterns: [ | ||
{ | ||
protocol: "https", | ||
hostname: "**", | ||
}, | ||
], |
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.
이것만 적용하면 밑에 domains는 없어도 되지 않나요?
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게