From 2fdd91dd93b343509afed8e2ec176c60e8e86435 Mon Sep 17 00:00:00 2001 From: Truc Nguyen Date: Wed, 27 Nov 2024 21:35:42 +0000 Subject: [PATCH] fix: auth0 on mobile (#14) --- frontend/src/hooks/useQueries.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useQueries.ts b/frontend/src/hooks/useQueries.ts index 8d553ef..a63ae79 100644 --- a/frontend/src/hooks/useQueries.ts +++ b/frontend/src/hooks/useQueries.ts @@ -1,6 +1,7 @@ import { useQuery } from '@tanstack/react-query'; import httpService from '../common/httpservice'; import { AttendantRequestModel, MatchSummaryModel, PlayerModel, RegistrationDetailModel, RegistrationModel, ValueLabel } from '../models'; +import { useApi } from './useApi'; export const usePlayersQuery = () => useQuery({ initialData: [], @@ -67,5 +68,8 @@ export const useMesssageTemplateQuery = () => useQuery({ export const useAttendantRequestsQuery = (externalUserId: string) => useQuery({ queryKey: ['getAttendantRequests', externalUserId], - queryFn: () => httpService.get(`api/v1/players/external-users/${externalUserId}/attendant-requests`) + queryFn: () => { + const api = useApi(); + return api.get(`api/v1/players/external-users/${externalUserId}/attendant-requests`); + } }); \ No newline at end of file