Skip to content

Commit

Permalink
Merge pull request #82 from danskernesdigitalebibliotek/DDFBRA-287-lo…
Browse files Browse the repository at this point in the history
…ading-indicator

fix: remove await from prefetch functions in search page for improved perceived performance when loading search result page
  • Loading branch information
ThomasGross authored Dec 30, 2024
2 parents f3d5a1d + 0e2d771 commit 20de6af
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 20de6af

Please sign in to comment.