Skip to content

Commit

Permalink
pages/campaigns: Fix wrong prefetch url on donation page (#1541)
Browse files Browse the repository at this point in the history
* pages/campaigns: Fix wrong prefetch url on donation page

* hooks/campaigns: Remove unused import
  • Loading branch information
sashko9807 authored Aug 3, 2023
1 parent b1e1c46 commit 796e916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/hooks/campaigns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { DonationStatus } from 'gql/donations.enums'
import { apiClient } from 'service/apiClient'
import { useCurrentPerson } from 'common/util/useCurrentPerson'
import { isAdmin } from 'common/util/roles'
import { AxiosError, AxiosResponse } from 'axios'
import { AxiosError } from 'axios'

// NOTE: shuffling the campaigns so that each gets its fair chance to be on top row
export const campaignsOrderQueryFunction: QueryFunction<CampaignResponse[]> = async ({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/campaigns/donation/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx: GetServerSideP
const { slug } = ctx.query
const client = new QueryClient()
await client.prefetchQuery<CampaignResponse>(
[endpoints.campaign.viewCampaign(slug as string)],
[endpoints.campaign.viewCampaign(slug as string).url],
queryFnFactory<CampaignResponse>(),
)
return {
Expand Down

0 comments on commit 796e916

Please sign in to comment.