Skip to content

Commit

Permalink
fix: hotfix campaign claims fetching (#630)
Browse files Browse the repository at this point in the history
Signed-off-by: Urban Vidovič <[email protected]>
  • Loading branch information
pseudobun authored Apr 19, 2024
1 parent 44aaf47 commit 1ee03cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/dapp/src/components/CampaignsDisplay/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';

import React from 'react';
import { CampaignDisplay } from './CampaignDisplay';
import { useCampaigns } from '@/hooks';
import { Spinner } from '@nextui-org/react';
Expand Down
3 changes: 2 additions & 1 deletion packages/dapp/src/hooks/useCampaignClaims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ export type Campaigns = Campaign[];
export const useCampaignClaims = (token: string | null) => {
return useQuery({
queryKey: ['claims'],
enabled: !!token,
queryFn: async () => {
const res = await fetch('/api/campaigns/claims', {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
...(token && { Authorization: `Bearer ${token}` }),
},
cache: 'no-store',
});
Expand Down

0 comments on commit 1ee03cd

Please sign in to comment.