-
Notifications
You must be signed in to change notification settings - Fork 6
Feat: 링크 검색 기능, 링크 추가 기능 구현 #78
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
The head ref may contain hidden characters: "feature/Link-\uD398\uC774\uC9C0"
Conversation
| const handleClick = () => { | ||
| // Addmodal 띄우면서 link 전달 | ||
| openModal("AddModal", { list: folderList, link: link }); | ||
| }; |
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.
잘 적용해주셨군요👍
영상 올려주신거 보니까 모달 한번 클릭하면 isLoading & 버튼 disabled 처리해서 중복으로 추가 방지하도록 해야겠습니다
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.
링크 추가 후에도 인풋에 입력값이 남아있어서 여기서 초기값 "" 으로 setLink 해주는게 좋을것같아요!
pages/link/index.tsx
Outdated
| const res = await proxy.get("/api/links", { | ||
| params: { search }, | ||
| }); | ||
| console.log(res.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.
테스트를 위해 콘솔 출력 해보신거라면 테스트 후에는 해당 코드를 삭제하는것이 좋겠습니다! :)
99minji
left a comment
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.
고생하셨습니다!
components/Layout/CardsLayout.tsx
Outdated
| <div className="grid place-items-center grid-cols-1 my-[24px] md:grid-cols-2 lg:grid-cols-3 gap-5 md:gap-6 lg:gap-[20px] w-full"> | ||
| {children} | ||
| </div> | ||
| ); |
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.

preview
링크 검색
default.mov
이 때 옵션에 params:{search}를 추가해줘야만 proxy서버에서 req.query 객체에 search값이 들어가 있습니다.
(params 옵션에 search 를 붙혀주면 "/api/links?search=000" 이런식으로 가고 없으면 "/api/links"로 가는 원리입니다.)
링크 추가
default.mov
( 이 때 부모에게 받은 folderList와 AddLinkInput가 갖고있는 link 상태값을 props로 전달합니다.)
남은 작업