Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
import {useQuery} from "@tanstack/react-query";
import {Attendee, IdParam} from "../types.ts";
import {attendeesClient} from "../api/attendee.client.ts";
export const GET_ATTENDEE_QUERY_KEY = 'getAttendee';
export const useGetAttendee = (eventId: IdParam, attendeeId: IdParam) => {
return useQuery<Attendee>({
queryKey: [GET_ATTENDEE_QUERY_KEY, eventId, attendeeId],
queryFn: async () => {
const {data} = await attendeesClient.findById(eventId, attendeeId);
return data;
},
staleTime: 0,
gcTime: 0
});
};