Skip to content

Commit

Permalink
fix: auth0 on mobile (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
truc9 committed Nov 27, 2024
1 parent 160d438 commit 2fdd91d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/hooks/useQueries.ts
Original file line number Diff line number Diff line change
@@ -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: [],
Expand Down Expand Up @@ -67,5 +68,8 @@ export const useMesssageTemplateQuery = () => useQuery({

export const useAttendantRequestsQuery = (externalUserId: string) => useQuery({
queryKey: ['getAttendantRequests', externalUserId],
queryFn: () => httpService.get<AttendantRequestModel[]>(`api/v1/players/external-users/${externalUserId}/attendant-requests`)
queryFn: () => {
const api = useApi();
return api.get<AttendantRequestModel[]>(`api/v1/players/external-users/${externalUserId}/attendant-requests`);
}
});

0 comments on commit 2fdd91d

Please sign in to comment.