more ts switches, use setcontext instead of stores

This commit is contained in:
2026-03-15 17:20:16 +01:00
parent b47a433414
commit 8573b82515
13 changed files with 115 additions and 99 deletions

View File

@@ -1,11 +1,16 @@
<script lang="ts">
import Sidebar from './Sidebar.svelte';
import Footer from './Footer.svelte';
let { data, children } = $props();
import { setStreamContext, StreamContext } from '$lib/stream-context.svelte.ts';
// streams are grabbed from the server here, then accessed throughout the rest
// of the components through the svelte context api
const { data, children } = $props();
setStreamContext(new StreamContext(data.streams));
</script>
<div id="mainContainer">
<div id="sidebar" class="panel"><Sidebar streams={data.streams} /></div>
<div id="sidebar" class="panel"><Sidebar /></div>
<div id="footer" class="panel-alt"><Footer /></div>
<div id="content">{@render children?.()}</div>
</div>