42organization / 42gg.client

탁구 매칭 웹 서비스 for 42cadet
https://gg.42seoul.kr
33 stars 7 forks source link

[Feat] usepagenation 적용, 버그 및 css 수정 #1498 #1502

Closed siwolee closed 1 month ago

siwolee commented 1 month ago

📌 개요

계속 호출하는 문제: api 호출 조건 제한을 통해 해결

  useEffect(() => {
    const fetchData = async () => {
      const data = await getData(currentPage.current);
      totalPages.current = Math.ceil(data.totalSize / size);
      setContent(data.content);
    };
    if (!status.current || status.current / 100 != 2) fetchData();
    console.log(url);
  }, [currentPage, getData, size]);

size, currentPage 변경 시 자동 호출 또한 다른 이유로 불렸을 경우에도 이전 호출 성공했을 경우 (200번대 status) 호출하지 않음

css

Screenshot 2024-08-22 at 9 59 58 PM

💡관련 Issue

siwolee commented 1 month ago

넵 콘솔로그 / 상대경로 처리하는 김에 겸사겸사 다 처리했습니다~! 감사합니다 close #1498