#1492 : add frame to select distance from searching events

This commit is contained in:
Laurent GAY
2024-10-30 17:29:24 +01:00
parent 9a04041694
commit 65ad3d855b
5 changed files with 152 additions and 10 deletions

View File

@@ -97,6 +97,7 @@ import { EventSortField, SortDirection } from "@/types/enums";
const props = defineProps<{
userLocation: LocationType;
doingGeoloc?: boolean;
distance: number | null;
}>();
defineEmits(["doGeoLoc"]);
@@ -112,9 +113,9 @@ const geoHash = computed(() => {
return geo;
});
const distance = computed<number>(() =>
userLocation.value?.isIPLocation ? 150 : 25
);
const distance = computed<number>(() => {
return props.distance | 25;
});
const eventsQuery = useQuery<{
searchEvents: Paginate<IEvent>;