generated from Arquisoft/lomap_0
-
Notifications
You must be signed in to change notification settings - Fork 1
Location Hooks
Mario Pérez edited this page Mar 13, 2023
·
2 revisions
Hooks exported by src/app/services/Location.tsx
Get the full list of locations from the API
const { locations, error, isLoading } = useGetLocationsQuery();
Sends a request to the API in order to create a new location
const { addLocation, {isLoading: isUpdating} } = useAddLocationMutation();
//or
const { addLocation, result } = useAddLocationMutation();
const {isLoading: isUpdating} = result;