From 3dfbd648b752252a559fdf90ea7a3ebf61066264 Mon Sep 17 00:00:00 2001 From: evlist Date: Fri, 2 Sep 2022 11:05:50 +0200 Subject: [PATCH] Reformating --- src/components/live-map.tsx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/live-map.tsx b/src/components/live-map.tsx index 86c70dc..48dc187 100644 --- a/src/components/live-map.tsx +++ b/src/components/live-map.tsx @@ -1,7 +1,7 @@ -import react from "react"; -import { useState, useEffect } from "react"; -import { Map, Marker, ZoomControl } from "pigeon-maps" -import { Geolocation } from "@awesome-cordova-plugins/geolocation"; +import react from 'react'; +import { useState, useEffect } from 'react'; +import { Map, Marker, ZoomControl } from 'pigeon-maps'; +import { Geolocation } from '@awesome-cordova-plugins/geolocation'; const LiveMap: react.FC = () => { const initialCenter: [number, number] = [44.73574, 6.18981]; @@ -10,27 +10,27 @@ const LiveMap: react.FC = () => { const [position, setPosition] = useState(initialCenter); const [zoom, setZoom] = useState(initialZoom); - useEffect(()=>{ - Geolocation.getCurrentPosition().then((position) => - { + useEffect(() => { + Geolocation.getCurrentPosition().then((position) => { setCenter([position.coords.latitude, position.coords.longitude]); setPosition([position.coords.latitude, position.coords.longitude]); - } - ); - - }, []) - + }); + }, []); + return ( - { + { setCenter(center); setZoom(zoom); - } - } animate={true}> - + }} + animate={true} + > + - ); + ); }; export default LiveMap;