Compare commits

..

2 commits

Author SHA1 Message Date
616a62d4b5 Add retrieved color to path
All checks were successful
ci/woodpecker/push/build Pipeline was successful
2023-12-13 18:31:38 +01:00
8f30dd9f54 Update typedef 2023-12-13 18:31:30 +01:00
2 changed files with 8 additions and 4 deletions

View file

@ -15,7 +15,8 @@ declare global {
"icon": "", "icon": "",
"created_at": null, "created_at": null,
"updated_at": null, "updated_at": null,
"deleted_at": null "deleted_at": null,
"color": string
} }
interface Sport { interface Sport {
"id": 1, "id": 1,
@ -67,5 +68,8 @@ declare global {
} }
} }
export { export {
Route Route,
Category,
Sport,
SportDetails
}; };

View file

@ -3,7 +3,7 @@
// import Splash from '$lib/components/Splash.svelte'; // import Splash from '$lib/components/Splash.svelte';
export let data; export let data;
let categories = data.categories; let categories: App.Category[] = data.categories;
</script> </script>
@ -14,7 +14,7 @@
<div id="welcome-message">Benvenuti a <span class="bold">Pianello Val Tidone</span></div> <div id="welcome-message">Benvenuti a <span class="bold">Pianello Val Tidone</span></div>
<div id="route-cards"> <div id="route-cards">
{#each categories as category} {#each categories as category}
<Path color="#de0e1b" name="{category.name_it}" id="{category.id}" /> <Path color={category.color} name="{category.name_it}" id={String(category.id)} />
{/each} {/each}
</div> </div>
</main> </main>