FEAT: Added METAR Page and updated code to update parameters when URL is sufficient enough
Some checks failed
Build and Push Development Docker Image / build-and-push (push) Successful in 1m52s
Run Unit and Integration Tests / test (push) Failing after 1m0s

This commit is contained in:
2025-06-18 21:19:09 +01:00
parent 0b0684a334
commit fa1a5aff1f
2 changed files with 39 additions and 3 deletions

View File

@ -3,6 +3,12 @@
import Card from '$lib/components/Cards/Card.svelte';
import { toasts } from 'svelte-toasts';
import Loading from '$lib/components/Loading.svelte';
import { page } from '$app/stores';
import { derived } from 'svelte/store';
// Get the ICAO parameter from the URL
const icao = derived(page, ($page) => $page.url.searchParams.get('icao'));
</script>
@ -21,7 +27,11 @@
<h2 slot="headerLeft">METAR</h2>
<h2 slot="headerRight">Results</h2>
<div slot="content" class="flex h-96 w-full items-center justify-center">
<Loading></Loading>
{#if $icao}
<span class="text-3xl font-bold">ICAO: {$icao}</span>
{:else}
<Loading />
{/if}
</div>
</Card>
</Section>