-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor: 서버 주소 추가 및 서버가 주는 정보에 맞춰 코드 변경한다 #163
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.
굿샷
const data: StationDetails = await response.json(); | ||
|
||
const changedDataList = Object.entries(data).map(([key, value]) => { | ||
if (INVALID_VALUE_LIST.includes(value)) value = null; |
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.
습니까?
const data: StationDetails = await response.json(); | ||
|
||
const changedDataList = Object.entries(data).map(([key, value]) => { | ||
if (INVALID_VALUE_LIST.includes(value)) value = null; |
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.
if (INVALID_VALUE_LIST.includes(value)) value = null; | |
if (INVALID_VALUE_LIST.includes(value)) { | |
return [key, null]; | |
} |
요게 더 좋지 않을까 하는 생각입니다!
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.
야미: 가브리엘은 이상한 사람이다
method: 'GET', | ||
}).then<StationDetails>((response) => { | ||
}).then<StationDetails>(async (response) => { | ||
if (!response.ok) { | ||
throw new Error('[error] 충전소 세부 정보를 불러올 수 없습니다.'); |
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.
상수로 분리해주세요
📄 Summary
🙋🏻 More
close #160