Skip to content

Commit

Permalink
Fix: portfolioList에 staleTime 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
y-solb committed Jul 9, 2024
1 parent 79caa2a commit c8d1637
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ import ButtonLink from '@/components/common/ButtonLink'

export default async function Home() {
const queryClient = new QueryClient()

await queryClient.prefetchInfiniteQuery({
queryKey: ['portfolioList'],
queryFn: ({ pageParam }) => getPortfolioList(pageParam),
initialPageParam: 1,
staleTime: 60 * 1000,
})

const dehydratedState = dehydrate(queryClient)
return (
<BaseLayout>
Expand Down

0 comments on commit c8d1637

Please sign in to comment.