Lint & small changes

This commit is contained in:
Andras Schmelczer 2026-04-04 22:59:07 +01:00
parent 0c6d207967
commit 55238f59aa
21 changed files with 2522 additions and 423 deletions

View file

@ -11,6 +11,8 @@ import { SearchIcon } from '../ui/icons/SearchIcon';
export interface SearchedLocation {
postcode: string;
geometry: PostcodeGeometry;
latitude: number;
longitude: number;
}
const ZOOM_FOR_TYPE: Record<string, number> = {
@ -94,7 +96,12 @@ export default function LocationSearch({
geometry: PostcodeGeometry;
} = await res.json();
onFlyTo(json.latitude, json.longitude, 16);
onLocationSearched?.({ postcode: json.postcode, geometry: json.geometry });
onLocationSearched?.({
postcode: json.postcode,
geometry: json.geometry,
latitude: json.latitude,
longitude: json.longitude,
});
search.clear();
if (isMobile) setExpanded(false);
} catch {
@ -139,7 +146,12 @@ export default function LocationSearch({
geometry: PostcodeGeometry;
} = await res.json();
onFlyTo(json.latitude, json.longitude, 16);
onLocationSearched?.({ postcode: json.postcode, geometry: json.geometry });
onLocationSearched?.({
postcode: json.postcode,
geometry: json.geometry,
latitude: json.latitude,
longitude: json.longitude,
});
search.clear();
if (isMobile) setExpanded(false);
} catch {