FEAT: Added METAR Page and updated code to update parameters when URL is sufficient enough
This commit is contained in:
@ -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>
|
Reference in New Issue
Block a user