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

ThisWeek 리스트 페이지 구현 #32

Merged
merged 16 commits into from
Aug 18, 2024
Merged

ThisWeek 리스트 페이지 구현 #32

merged 16 commits into from
Aug 18, 2024

Conversation

froggy1014
Copy link
Collaborator

@froggy1014 froggy1014 commented Aug 18, 2024

PR 타입 ( 하나 이상의 PR 타입을 선택해주세요 )

  • 기능 추가
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 기타 사소한 수정

개요

Close #30

변경 사항

Page단에서 페칭했었는데, 그럴 필요가 없을 것 같아서 리스트 컴포넌트에서 직접 페칭하도록 수정했습니다.

export default async function Page() {
  const hotFestivals = await getHotFestival();
  return (
    <div className="mb-[60px] mt-[44px]">
      <HomeHeader />
      <HomeView hotFestivals={hotFestivals} />
      <NavigationBar />
    </div>
  );
export default async function Page() {
  return (
    <div className="mb-[60px] mt-[44px]">
        <FestivalHot />
        <FestivalThisWeek />
      <NavigationBar />
    </div>
  );

const FestivalHot = async () => {
  const hotFestivals = await getHotFestival();

  return (
    {.....componets}
  );
};

const FestivalThisWeek = async () => {
  const thisWeekFestivals = await getThisWeekFestival();

  return (
    {.....componets}
  );
};

페이지네이션 컴포넌트에 아래 프롭스 추가했습니다.

더미데이터를 작업해서 놓친부분.. 수정했습니다.

<Pagination
        currentPath={FIESTA_ENDPOINTS.festivals.thisWeek}
        currentPage={parsedParams.page}
        totalPage={festivals.totalPages} <- 추가
        size={parsedParams.size} <- 추가
      />

코드 리뷰시 참고 사항

@froggy1014 froggy1014 self-assigned this Aug 18, 2024
Copy link

vercel bot commented Aug 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fiesta ❌ Failed (Inspect) Aug 18, 2024 1:09pm

@froggy1014 froggy1014 linked an issue Aug 18, 2024 that may be closed by this pull request
Copy link
Member

@Zero-1016 Zero-1016 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 정민님은 모듈화를 잘하시는것 같네요!

코드를 보고 배울 점이 많습니다!

src/components/Pagination/Pagination.tsx Outdated Show resolved Hide resolved
src/mocks/data/festivalMocks/thisWeekFestivalHandler.ts Outdated Show resolved Hide resolved
@froggy1014 froggy1014 merged commit ceee7b7 into develop Aug 18, 2024
1 of 2 checks passed
@froggy1014 froggy1014 deleted the feature/thisweek branch August 18, 2024 13:08
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.

[Feat] This Week
2 participants