-
Notifications
You must be signed in to change notification settings - Fork 6
Feat: 페이지네이션 merge 이후 Link 페이지 개선, useViewport useFetchLinks 훅 추가 #91
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
| { src: "/icons/share.svg", alt: "공유", text: "공유" }, | ||
| { src: "/icons/pen.svg", alt: "이름 변경", text: "이름 변경" }, | ||
| { src: "/icons/delete.svg", alt: "삭제", text: "삭제" }, | ||
| ].map(({ src, alt, text }) => ( |
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.
버튼 구현 이렇게 하니까 깔끔하네요
lib/api/fetchProxy.ts
Outdated
| @@ -0,0 +1,10 @@ | |||
| import { proxy } from "./axiosInstanceApi"; | |||
|
|
|||
| // SSR에서 proxy로 요청 보낼 때 사용하는 로직 ㅜㅊ상화 | |||
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.
수정하겟습니다~
| useEffect(() => { | ||
| const fetchLinks = async () => { | ||
| const res = await proxy.get("/api/links", { params: { search } }); | ||
| const res = await proxy.get("/api/links", { | ||
| params: { | ||
| page: query.page, | ||
| pageSize: isTablet ? 6 : 10, | ||
| search: query.search, | ||
| }, | ||
| }); | ||
| setLinkCardList(res.data.list); | ||
| }; |
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.
잘 사용하겠습니다 😭
hongggyelim
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.
확인했습니다! 수고하셨습니다
preview
링크 검색
default.mov
이 때 옵션에 params:{search}를 추가해줘야만 proxy서버에서 req.query 객체에 search값이 들어가 있습니다.
(params 옵션에 search 를 붙혀주면 "/api/links?search=000" 이런식으로 가고 없으면 "/api/links"로 가는 원리입니다.)
링크 추가
default.mov
( 이 때 부모에게 받은 folderList와 AddLinkInput가 갖고있는 link 상태값을 props로 전달합니다.)
폴더 추가
default.mov
남은 작업