Compare commits

..

2 commits

Author SHA1 Message Date
0dfca0de17 Add route data to tabs
Some checks failed
ci/woodpecker/push/build Pipeline failed
2023-11-27 05:40:03 +01:00
af238ff7e2 Fix wrong typedef 2023-11-27 05:39:48 +01:00
2 changed files with 2 additions and 8 deletions

View file

@ -40,7 +40,7 @@ const getRouteByCategory = async (categoryId: number) => {
}
const getRoute = async (routeId: number) => {
let data = [];
let data = {};
if (import.meta.env.PROD) {
const response = await fetch(`${API_URL}/route/${routeId}`);
const json = await response.json();

View file

@ -6,12 +6,6 @@
export let data: App.Route;
let divider;
onMount(async () => {
console.log(data);
});
const mapClick = (evt) => {};
</script>
<Header></Header>
@ -22,7 +16,7 @@
<p>Percorso <b>{data.name_it}</b></p>
<p id="duration">Dislivello {data.elevation_gain}</p>
</div>
<Tabs on:map-click={mapClick} route={data}></Tabs>
<Tabs route={data}></Tabs>
</div>
<style>