@@ -2,8 +2,6 @@ import { React, useEffect, useState } from "react";
2
2
import MapWrapper from "../map/MapWrapper" ;
3
3
import { getFeaturesForMap } from "../../util/helper" ;
4
4
import BackButton from "../BackButton" ;
5
- import { ReactComponent as IconCirclePlay } from "../../icons/circle-play-solid.svg" ;
6
- import { ReactComponent as IconMap } from "../../icons/map-solid.svg" ;
7
5
8
6
function SelectedRoute ( { selectedRoute } ) {
9
7
const [ featuresForMap , setFeaturesForMap ] = useState ( null ) ;
@@ -18,17 +16,22 @@ function SelectedRoute({ selectedRoute }) {
18
16
19
17
if ( selectedRoute === null || featuresForMap === null ) return null ;
20
18
21
- console . log ( selectedRoute )
22
-
23
19
return (
24
20
< >
25
21
< MapWrapper mapData = { featuresForMap } goToView = { featuresForMap [ 0 ] } />
26
22
< BackButton > Kategorier</ BackButton >
27
23
< div className = "relative ml-2" >
28
24
{ /* TODO: show the real category instead of "Valgt kategory" */ }
29
- < p className = "mt-10 text-sm font-bold text-emerald-800 dark:text-emerald-400 drop-shadow" > Valgt kategori</ p >
30
- < h1 className = "text-4xl font-bold mb-5 drop-shadow" > { selectedRoute . name } </ h1 >
31
- < div id = "info-box" className = "bg-zinc-100 dark:bg-zinc-700 rounded p-3 w-32 drop-shadow" >
25
+ < p className = "mt-10 text-sm font-bold text-emerald-800 dark:text-emerald-400 drop-shadow" >
26
+ Valgt kategori
27
+ </ p >
28
+ < h1 className = "text-4xl font-bold mb-5 drop-shadow" >
29
+ { selectedRoute . name }
30
+ </ h1 >
31
+ < div
32
+ id = "info-box"
33
+ className = "bg-zinc-100 dark:bg-zinc-700 rounded p-3 w-32 drop-shadow"
34
+ >
32
35
< label htmlFor = "distance" className = "mb-5" >
33
36
< span className = "text-xs" > Distance</ span >
34
37
< div id = "distance" className = "text-lg" >
@@ -49,26 +52,6 @@ function SelectedRoute({ selectedRoute }) {
49
52
< div id = "length" className = "text-lg" />
50
53
</ label >
51
54
</ div >
52
- < div id = "buttons" className = "relative mt-5 flex gap-3" >
53
- < button
54
- className = "p-2 rounded text-zinc-100 dark:text-zinc-800 bg-zinc-800 dark:bg-zinc-100 drop-shadow"
55
- type = "button"
56
- // TODO: Change onClick to go to selected route
57
- //onClick={() => setSource(podcast)}
58
- >
59
- < IconCirclePlay className = "w-6 h-6" />
60
- < span className = "sr-only" > Afspil</ span >
61
- </ button >
62
- < button
63
- className = "p-2 rounded text-zinc-100 dark:text-zinc-800 bg-zinc-800 dark:bg-zinc-100 drop-shadow"
64
- type = "button"
65
- // TODO: Change onClick to toggle map layer
66
- //onClick={() => setSource(podcast)}
67
- >
68
- < IconMap className = "w-6 h-6" />
69
- < span className = "sr-only" > Vis kortet</ span >
70
- </ button >
71
- </ div >
72
55
</ div >
73
56
</ >
74
57
) ;
0 commit comments