-
Notifications
You must be signed in to change notification settings - Fork 44
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
[장문원] week20 #491
The head ref may contain hidden characters: "part3-\uC7A5\uBB38\uC6D0-week20"
[장문원] week20 #491
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 response = await axiosInstance.get("/users/1/folders"); | ||
const data: Data[] = response.data; | ||
return data; | ||
} |
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.
AS-IS
export async function getFolders(): Promise<Data[]> {
const response = await axiosInstance.get("/users/1/folders");
const data: Data[] = response.data;
return data;
}
TO-BE
export async function getFolders(params: { userId: number }): Promise<Data[]> {
const { userId } = params;
const response = await axios.get<Data[]>(`/users/${userId}/folders`);
return response.data;
}
const response = await axiosInstance.get("/users/1/links"); | ||
const data: Data[] = response.data; | ||
return data; | ||
} |
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.
AS-IS
export async function getLinks(): Promise<Data[]> {
const response = await axiosInstance.get("/users/1/links");
const data: Data[] = response.data;
return data;
}
TO-BE
export async function getLinks(params: { uesrId: number }): Promise<Data[]> {
const { uesrId } = params;
const response = await axios.get<Data[]>(`/users/${uesrId}/links`);
return response.data;
}
</> | ||
) : ( | ||
<h1>데이터가 없습니다</h1> | ||
)} |
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.
<h1>
태그는 html파일 하나당 1개만 존재해야해요!
책에 제목이 여러개일수는 없듯이요 ㅎ
주요 변경사항
멘토에게