Skip to content

Commit 0b52aca

Browse files
committed
SALG-1278: WIP - Check audio playing
1 parent a47944c commit 0b52aca

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/routes/RoutePage.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { React, useEffect, useState } from "react";
1+
import { React, useEffect, useState, useContext } from "react";
22
import { useParams } from "react-router-dom";
33
import useFetch from "../../util/useFetch";
44
import PointOfInterest from "../points-of-interest/PointOfInterest";
@@ -17,6 +17,11 @@ function RoutePage() {
1717
const [latitude, setLatitude] = useState(0);
1818
const [longitude, setLongitude] = useState(0);
1919
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;
2025
const isIOS =
2126
navigator.userAgent.match(/(iPod|iPhone|iPad)/) &&
2227
navigator.userAgent.match(/AppleWebKit/);
@@ -91,6 +96,9 @@ function RoutePage() {
9196
}, [pointsOfInterest]);
9297

9398
if (selectedRoute === null) return null;
99+
100+
console.log(audio);
101+
94102
return (
95103
<div className="flex flex-col place-items-start pb-20">
96104
<BackButton>Afslut</BackButton>

0 commit comments

Comments
 (0)