1
- import { React , useEffect , useState } from "react" ;
1
+ import { React , useEffect , useState , useContext } from "react" ;
2
2
import { useParams } from "react-router-dom" ;
3
3
import useFetch from "../../util/useFetch" ;
4
4
import PointOfInterest from "../points-of-interest/PointOfInterest" ;
@@ -17,6 +17,11 @@ function RoutePage() {
17
17
const [ latitude , setLatitude ] = useState ( 0 ) ;
18
18
const [ longitude , setLongitude ] = useState ( 0 ) ;
19
19
const [ destinationName , setDestinationName ] = useState ( null ) ;
20
+ const [ userLatitude , setUserLatitude ] = useState ( 0 ) ;
21
+ const [ userLongitude , setUserLongitude ] = useState ( 0 ) ;
22
+ const { audio } = useContext ( AudioContext ) ;
23
+ let handlerAvailable = true ;
24
+ let locationHandlerAvailable = true ;
20
25
const isIOS =
21
26
navigator . userAgent . match ( / ( i P o d | i P h o n e | i P a d ) / ) &&
22
27
navigator . userAgent . match ( / A p p l e W e b K i t / ) ;
@@ -91,6 +96,9 @@ function RoutePage() {
91
96
} , [ pointsOfInterest ] ) ;
92
97
93
98
if ( selectedRoute === null ) return null ;
99
+
100
+ console . log ( audio ) ;
101
+
94
102
return (
95
103
< div className = "flex flex-col place-items-start pb-20" >
96
104
< BackButton > Afslut</ BackButton >
0 commit comments