diff --git a/src/lib/ldb/public-ldb.svelte b/src/lib/ldb/public-ldb.svelte
index 02e374d..2a0129f 100644
--- a/src/lib/ldb/public-ldb.svelte
+++ b/src/lib/ldb/public-ldb.svelte
@@ -1,29 +1,39 @@
+
+ async function fetchData() {
+ console.log(`Requested Station: ${requestedStation}`);
+ const data = await fetch(`https://owlboard.info/api/v1/ldb/${requestedStation}`);
+ jsonData = await data.json();
+ }
+
+ onMount(() => {
+ if (requestedStation && jsonData === null) {
+ fetchData();
+ }
+ });
+
+
+
{requestedStation.toUpperCase()}
@@ -47,7 +57,7 @@
{service.origin?.location?.locationName || ''} |
{service.destination?.location?.locationName || ''} |
- {service.platform || ''} |
+ {service.platform || '-'} |
{/each}
@@ -56,5 +66,6 @@
table {
width: 100%;
margin: auto;
+ color: white;
}
\ No newline at end of file
diff --git a/src/routes/ldb/+page.svelte b/src/routes/ldb/+page.svelte
index 9d5e13f..21ecb66 100644
--- a/src/routes/ldb/+page.svelte
+++ b/src/routes/ldb/+page.svelte
@@ -9,10 +9,12 @@
return new URLSearchParams(window.location.search).get('station');
}
- let station = ""
+ let station;
+ let staff;
onMount(async () => {
station = await getHeadcode() || "";
+ staff = false;
})
@@ -20,6 +22,8 @@
+{#if !staff}
+{/if}
diff --git a/svelte.config.js b/svelte.config.js
index 0a3eae5..a24f46d 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -5,7 +5,7 @@ export default {
adapter: adapter({
pages: 'build',
assets: 'build',
- fallback: '/',
+ fallback: 'undefined',
precompress: true,
strict: true
})