랭킹페이지 페이지네이션 API 연결 구현 완료 - #26
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
||
| // c | ||
| "#include <stdio.h>\n\n int main(){\n\n printf(“Hello world” );\n return 0;\n}", | ||
| "#include <stdio.h>\n\nint main() {\n printf(“Hello world”);\n return 0;\n}", |
There was a problem hiding this comment.
앗 미세한 오타들을 잘 잡아주셨네요! 이 라인에 printf("Hello world!") 를 보시면 큰따옴표가 양쪽 모양이 다른 일반적인 문서의 큰따옴표로 돼 있어서 실제 입력할 때는 큰따옴표를 입력해도 오타로 인식하더라구요. 아마 요 부분 그냥 코드에디터 상에서 지웠다가 큰 따옴표 입력해주시면 고쳐질 것 같아요!
| const [offSet, setOffSet] = useState(2); | ||
|
|
||
|
|
||
| const topRanks = useRanks(1, pageSize, languageNo, grammarNo).ranks; |
There was a problem hiding this comment.
앗 topRanks 같은 경우 고정적으로 pageSize 2로 해서 받아와도 될 것 같은데 어떻게 생각하시나용
There was a problem hiding this comment.
앗 그러네요! 반영해서 수정해보도록 하겠습니다!
…/github.com/jaychang99/tadak-frontend into Feature_Issue#11_Leaderboard_Pagination_API
| ranks.map((rank, index) => ( | ||
| <LeaderBoardItem | ||
| rank={(pageNumber == 1) ? index + 1 + TOP_DISPLAY_USER : index + 1 + pageSize} | ||
| rank={rank.ranking} |
There was a problem hiding this comment.
오홍 맞네요 이제 API 자체에서 ranking 을 주니까 pageSize 와 pageNumber 로 계산을 안 해도 돼서 좋군요. 그러면 prop 에서도 받아오지 않아도 좋을 것 같은데 어떻게 생각하시나용?
There was a problem hiding this comment.
앗 그러네요 ,,, 수정할게요 !
There was a problem hiding this comment.
확인했습니다 본 thread 는 resolve 하겟습니다!
| import React, { useState, useEffect } from "react"; | ||
| import { defaultFadeInVariants, staggerHalf, staggerQuarter } from "styles/motions"; | ||
| import { filterProps, motion } from "framer-motion"; | ||
| import { motion } from "framer-motion"; |
There was a problem hiding this comment.
지금 보니까 이 motion 도 아래에서 안 쓰이는 것 같은데 확인 한번 해 주실 수 있나용 이건 아마 제가 import 해둔거같긴한데... ㅜ.ㅜ 헛헛
There was a problem hiding this comment.
저도 처음에 그런 줄 알고 지웠다가 오류가 나서 봤더니 motion.div에서 쓰이는 것 같더라구요 ,,,,
There was a problem hiding this comment.
앗 맞네요 밑에 <motion.div> 가 있네요..헛헛 😅 코드 가 접혀져서 못 봤나보네요 죄송함니다...ㅋㅋ
| {ranks.length !== 0 && ( | ||
| <> | ||
| <LeaderBoard ranks={(pageNumber == 1) ? ranks.slice(2) : ranks} pageNumber={pageNumber} pageSize={pageSize}></LeaderBoard> | ||
| <LeaderBoard ranks={(pageNumber === 1) ? ranks.slice(2) : ranks} pageNumber={pageNumber} pageSize={LEADERBOARD_PAGE_SIZE}></LeaderBoard> |
There was a problem hiding this comment.
API 에 이제 ranking 이 추가되어서 요기 이제 pageNumber 랑 pageSize 넘기지 않아도 되지 않을까용?
There was a problem hiding this comment.
네네 안 남겨도 될 것 같습니다
|
늦은 시간에도 고생하셨습니다! 추가적인 부분도 comment 달아놓았습니다! |
src/pages/Login/index.js 에서 try-catch 부분 제외하고 수정 완료해서 push 해두었습니다! |
| import React, { useState, useEffect } from "react"; | ||
| import { defaultFadeInVariants, staggerHalf, staggerQuarter } from "styles/motions"; | ||
| import { filterProps, motion } from "framer-motion"; | ||
| import { motion } from "framer-motion"; |
There was a problem hiding this comment.
앗 맞네요 밑에 <motion.div> 가 있네요..헛헛 😅 코드 가 접혀져서 못 봤나보네요 죄송함니다...ㅋㅋ
| ranks.map((rank, index) => ( | ||
| <LeaderBoardItem | ||
| rank={(pageNumber == 1) ? index + 1 + TOP_DISPLAY_USER : index + 1 + pageSize} | ||
| rank={rank.ranking} |
There was a problem hiding this comment.
확인했습니다 본 thread 는 resolve 하겟습니다!
Related to #11
체크 리스트
작업 내역
비고