mobilizon.chapril.org-mobil.../js/src/composition/apollo/address.ts
Thomas Citharel ee20e03cc2
Migrate to Vue 3 and Vite
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-08-11 16:46:31 +02:00

17 lines
406 B
TypeScript

import { REVERSE_GEOCODE } from "@/graphql/address";
import { useLazyQuery } from "@vue/apollo-composable";
import { IAddress } from "@/types/address.model";
type reverseGeoCodeType = {
latitude: number;
longitude: number;
zoom: number;
locale: string;
};
export function useReverseGeocode() {
return useLazyQuery<{ reverseGeocode: IAddress[] }, reverseGeoCodeType>(
REVERSE_GEOCODE
);
}