Skip to content
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

[김준영] Week16 #1067

Conversation

yohan11
Copy link
Collaborator

@yohan11 yohan11 commented May 3, 2024

요구사항

기본

  • 링크 공유 페이지의 url path를 ‘/shared/{folderId}’로 변경하고, {folderId}에 해당하는 폴더 데이터가 화면에 보이게 해주세요.
  • 폴더 페이지의 url path를 전체 링크를 보는 경우 ‘/folder’로, 특정 폴더를 보는 경우 ‘/folder/{folderId}’로 변경하고, {folderId}에 해당하는 폴더 데이터가 화면에 보이게 해주세요.
  • https://bootcamp-api.codeit.kr/docs 에서 인증이 필요한(자물쇠 아이콘이 있음) api의 경우 Authorization 리퀘스트 헤더에 “Bearer {accessToken}”을 함께 보내야 합니다.

심화

  • 리퀘스트 헤더에 인증 토큰을 첨부할 때 axios interceptors를 활용해 주세요. (axios를 사용하지 않는다면 이와 유사한 기능을 활용해 주세요.)

리팩토링 예정

  • accessToken 없을 때 로그인 페이지로 넘어가기
  • 타입 오류 수정하기
  • 로그인 직후 넘어가는 페이지 지정하기
  • import 경로 수정하기
  • 등등 멘토님의 코드리뷰 반영..

멘토에게

  • part3 기간동안 도움이 되는 조언 해주셔서 정말 많은 도움이 되었습니다. 감사합니다!!!
  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

Copy link

vercel bot commented May 3, 2024

@yohan11 is attempting to deploy a commit to the soohwan93's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yohan11 yohan11 requested a review from arthurkimdev May 3, 2024 03:50
@yohan11 yohan11 added the 미완성 죄송합니다.. label May 3, 2024
Copy link
Collaborator

@arthurkimdev arthurkimdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마지막 16주차 과제까지 수고하셨습니다~ 👍

Comment on lines +48 to +51
{links &&
links.map((link) => {
const createdAt = link.created_at || link.createdAt;
const imageSource = link.image_source || link.imageSource;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

뭔가 Prettier, Lint 룰이 변경되었나보군요!

Comment on lines +56 to +69
return (
<Card
key={link.id}
id={link.id}
cardImage={imageSource}
cardTime={{
createdDateString: formatDate(createdDate),
timeDifference: getTimeDifference(createdDate, currentDate),
}}
cardDescription={link.description || ""}
cardUrl={link.url}
/>
);
})}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

뭔가 Prettier, Lint 룰이 변경되었나보군요!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

들여쓰기 뎁스는 보통 실무에서 4보다는 2를 더 많이 사용하곤 합니다~

Comment on lines -32 to +48
{foldersInfo.length !== 0
{foldersInfo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 반영 굳 입니다! 👍

Comment on lines +54 to +56
if (!context) {
throw new Error("");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러 메시지에 "" 보다는 아래처럼 조금 더 구체적인 메시지가 담기면 향후 디버깅에 보다 수월할거에요~

if (!context) {
    throw new Error("MyInfoContext state error");
  }

hostname: "bootcamp-api.codeit.kr",
port: "",
pathname: "/api/**", //**는 해당 경로 뒤에 모든 경로,
hostname: "**",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 반영 굳! 👍

Comment on lines +99 to +102
const loadFolders = async () => {
const res = await getFolders();
setFoldersInfo(res);
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 다른 곳에서도 사용되던데, 이런 경우 util로 분리해서 함께 사용해도 좋겠습니다.

Comment on lines +3 to 5
function Index() {
return <div>Index</div>;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

페이지 컴포넌트명이 Index 보다는 Home 혹은 Main 이 보다 명시적일 것 같습니다~

Comment on lines +64 to +76
// const loadNewLinks = () => {
// if (keyword) {
// const loweredKeyword = keyword.toLowerCase();
// setLinks((prevState: TLink[]) => FILTER_LINKS(prevState, loweredKeyword));
// } else {
// setLinks(folderInfo.links);
// }
// };

// useEffect(() => {
// loadNewLinks();
// }, [keyword]);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사용하지 않는 주석은 제거 해주세요~

{keyword ? (
<SearchMessage>
{keyword}
<span className="font-color-gray4">으로 검색한 결과입니다.</span>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

font-color-gray4 css 클래스명이 구체적이라 좋습니다.

@arthurkimdev arthurkimdev merged commit 804e55a into codeit-bootcamp-frontend:part3-김준영 May 3, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
미완성 죄송합니다..
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants