Skip to content

Commit

Permalink
fix: remove await from prefetch functions in search page for improved…
Browse files Browse the repository at this point in the history
… perceived performance when loading search result page
  • Loading branch information
ThomasGross committed Dec 19, 2024
1 parent 6ab61d6 commit 0e2d771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const Page = async (props: { searchParams: Promise<{ q: string }> }) => {
const { q } = searchParams

const queryClient = getQueryClient()
await prefetchSearchResult(q, queryClient)
await prefetchSearchFacets(q, queryClient)
prefetchSearchResult(q, queryClient)
prefetchSearchFacets(q, queryClient)

return (
<HydrationBoundary state={dehydrate(queryClient)}>
Expand Down

0 comments on commit 0e2d771

Please sign in to comment.