Remove some unused code
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
Alessio Davoli 2023-12-12 18:53:49 +01:00
parent a7f9940ab1
commit 40277e3380
3 changed files with 9 additions and 8 deletions

View file

@ -9,10 +9,6 @@
let ref: HTMLDivElement; let ref: HTMLDivElement;
let component = InfoTab; let component = InfoTab;
onMount(() => {
const gbcr = ref.getBoundingClientRect();
ref.style.height = `${gbcr.height}px`;
});
const activeClicked = (evt) => { const activeClicked = (evt) => {
const clickedTab = evt.target.closest('button'); const clickedTab = evt.target.closest('button');
@ -35,7 +31,7 @@
break; break;
} }
dispatch('map-click', { component }); dispatch('tab-click', { component });
}; };
</script> </script>

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { onMount, onDestroy } from 'svelte'; import { onMount, onDestroy } from 'svelte';
import { fade, fly } from 'svelte/transition'; import { fade } from 'svelte/transition';
export let route; export let route;
const pianelloCoordinates = [43.14, 12.53]; const pianelloCoordinates = [43.14, 12.53];

View file

@ -1,12 +1,17 @@
<script lang="ts"> <script lang="ts">
import Header from '$lib/components/Header.svelte'; import Header from '$lib/components/Header.svelte';
import Tabs from '$lib/components/Tabs.svelte'; import Tabs from '$lib/components/Tabs.svelte';
import MapTab from '$lib/components/tabs/MapTab.svelte';
export let data: App.Route; export let data: App.Route;
let divider; let divider;
const mapClick = () => {}; const tabClick = (event) => {
if (event.detail.component === MapTab) {
}
};
</script> </script>
<Header></Header> <Header></Header>
@ -17,7 +22,7 @@
<p class='path-name'>Percorso <b>{data.name_it}</b></p> <p class='path-name'>Percorso <b>{data.name_it}</b></p>
<p id="duration">Dislivello {data?.route_sport_details[0]?.elevation_gain} m</p> <p id="duration">Dislivello {data?.route_sport_details[0]?.elevation_gain} m</p>
</div> </div>
<Tabs on:map-click={mapClick} route={data}></Tabs> <Tabs on:tab-click={tabClick} route={data}></Tabs>
</div> </div>
<style> <style>