Add a basic dataset page

This commit is contained in:
Zeph Levy 2026-02-19 14:11:42 +01:00
parent 8e31d3feea
commit 53a16dbc31
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,9 @@
import type { PageServerLoad } from "./$types";
import * as backend from "$lib/server/backend";
export const load: PageServerLoad = async ({ params }) => {
const record = await backend.query_dataset(params.id);
return {
record,
};
}

View file

@ -0,0 +1,14 @@
<script lang="ts">
import type { PageProps } from "./$types";
let { data }: PageProps = $props();
// svelte-ignore state_referenced_locally
const recordData = JSON.parse(data.record.data);
</script>
<ul>
{#each Object.entries(recordData) as [key, value]}
<li>{key}: {value}</li>
{/each}
</ul>