1
1
import { React , useEffect , useState } from "react" ;
2
2
import MapWrapper from "../map/MapWrapper" ;
3
3
import { getFeaturesForMap } from "../../util/helper" ;
4
+ import BackButton from "../BackButton" ;
4
5
5
6
function SelectedRoute ( { selectedRoute } ) {
6
7
const [ featuresForMap , setFeaturesForMap ] = useState ( null ) ;
@@ -18,23 +19,30 @@ function SelectedRoute({ selectedRoute }) {
18
19
return (
19
20
< >
20
21
< MapWrapper mapData = { featuresForMap } goToView = { featuresForMap [ 0 ] } />
21
- < h1 > { selectedRoute . name } </ h1 >
22
- < div >
23
- < label htmlFor = "distance" >
24
- Distance
25
- < div id = "distance" > { selectedRoute . distance } </ div >
26
- </ label >
27
- < label htmlFor = "poi" >
28
- Dele
29
- < div id = "poi" > { selectedRoute . pointsOfInterest . length } </ div >
30
- </ label >
31
- { /* todo skeleton screen (I think I recall tailwind having these ootb) or some wait indication */ }
32
- { /* todo how to sum up podcasts */ }
33
- < label htmlFor = "length" >
34
- Afspilningstid
35
- { /* todo */ }
36
- < div id = "length" />
37
- </ label >
22
+ < BackButton > Kategorier</ BackButton >
23
+ < div className = "relative ml-2" >
24
+ < h1 className = "text-4xl font-bold mt-10 mb-5" > { selectedRoute . name } </ h1 >
25
+ < div className = "info-box bg-zinc-100 dark:bg-zinc-700 rounded p-3 w-32" >
26
+ < label htmlFor = "distance" className = "mb-5" >
27
+ < span className = "text-xs" > Distance</ span >
28
+ < div id = "distance" className = "text-lg" >
29
+ { selectedRoute . distance }
30
+ </ div >
31
+ </ label >
32
+ < label htmlFor = "poi" className = "mb-5" >
33
+ < span className = "text-xs" > Dele</ span >
34
+ < div id = "poi" className = "text-lg" >
35
+ { selectedRoute . pointsOfInterest . length }
36
+ </ div >
37
+ </ label >
38
+ { /* todo skeleton screen (I think I recall tailwind having these ootb) or some wait indication */ }
39
+ { /* todo how to sum up podcasts */ }
40
+ < label htmlFor = "length" >
41
+ < span className = "text-xs" > Afspilningstid</ span >
42
+ { /* todo */ }
43
+ < div id = "length" className = "text-lg" />
44
+ </ label >
45
+ </ div >
38
46
</ div >
39
47
</ >
40
48
) ;
0 commit comments