[김태진] week20#1068
Open
kimtaejin3 wants to merge 14 commits intocodeit-bootcamp-frontend:part3-김태진from
Hidden character warning
The head ref may contain hidden characters: "part3-\uae40\ud0dc\uc9c4"
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
kimtaejin3
commented
May 13, 2024
| <div>로딩중입니다...</div> | ||
| ) : folderListError ? ( | ||
| <div>폴더 정보들을 가져오는데 실패했습니다.</div> | ||
| ) : ( |
Author
There was a problem hiding this comment.
로딩, 에러 처리를 일단 위 같은 식으로 삼항연산자를 중첩해서 사용했는데 어떻게 개선하면 좋을까요?
Collaborator
There was a problem hiding this comment.
지금도 괜찮다고 생각하지만, 아래처럼 하는것도 괜찮을거같아요. status로, 같은 상태를 기준으로 하면서 &&로 짧은 표현으로요
Suggested change
| ) : ( | |
| {status === 'loading' && <div>로딩중입니다...</div>} | |
| {status === 'error' && | |
| <div>폴더 정보들을 가져오는데 실패했습니다.</div>} |
domuk-k
approved these changes
May 20, 2024
| export const instance = axios.create({ | ||
| baseURL: "https://bootcamp-api.codeit.kr/api", | ||
| timeout: 1000, | ||
| baseURL: " https://bootcamp-api.codeit.kr/api/linkbrary/v1", |
| password: string; | ||
| }) { | ||
| const response = await fetch(`${BASE_URL}/sign-in`, { | ||
| const response = await fetch(`${BASE_URL}/auth/sign-in`, { |
Collaborator
There was a problem hiding this comment.
http client로 axios를 사용한다면, 특별한 경우를 제외하고는 통일하시는게 일반적으로 좋습니다
| <div>로딩중입니다...</div> | ||
| ) : folderListError ? ( | ||
| <div>폴더 정보들을 가져오는데 실패했습니다.</div> | ||
| ) : ( |
Collaborator
There was a problem hiding this comment.
지금도 괜찮다고 생각하지만, 아래처럼 하는것도 괜찮을거같아요. status로, 같은 상태를 기준으로 하면서 &&로 짧은 표현으로요
Suggested change
| ) : ( | |
| {status === 'loading' && <div>로딩중입니다...</div>} | |
| {status === 'error' && | |
| <div>폴더 정보들을 가져오는데 실패했습니다.</div>} |
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.
요구사항
기본
심화
없음
멘토에게