Skip to content

Commit

Permalink
my campaigns is now visible (#1499)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhaniivanov authored Jul 20, 2023
1 parent 33bf4a8 commit 1342c8e
Show file tree
Hide file tree
Showing 3 changed files with 5 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 @@ -60,7 +60,7 @@ export function useCampaignAdminList() {
export const useGetUserCampaigns = () => {
const { data: session } = useSession()
return useQuery<AdminCampaignResponse[]>(
[endpoints.campaign.getUserDonatedToCampaigns.url],
[endpoints.campaign.getUserCampaigns.url],
authQueryFnFactory<AdminCampaignResponse[]>(session?.accessToken),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ export default function MyDonatedToCampaignTable() {
headerAlign: 'left',
},
]
console.log(data, 'dataaa')
return (
<>
{data.length !== 0 ? (
Expand Down
4 changes: 4 additions & 0 deletions src/service/apiEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const endpoints = {
url: '/campaign/user-donations-campaigns',
method: 'GET',
},
getUserCampaigns: <Endpoint>{
url: '/campaign/get-user-campaigns',
method: 'GET',
},
createCampaign: <Endpoint>{ url: '/campaign/create-campaign', method: 'POST' },
canEditCampaign: (slug: string) =>
<Endpoint>{ url: `/campaign/${slug}/can-edit`, method: 'GET' },
Expand Down

0 comments on commit 1342c8e

Please sign in to comment.