diff --git a/frontend/src/routes/YoutubeDashboard.svelte b/frontend/src/routes/YoutubeDashboard.svelte index 3a153ec..a547748 100644 --- a/frontend/src/routes/YoutubeDashboard.svelte +++ b/frontend/src/routes/YoutubeDashboard.svelte @@ -8,6 +8,7 @@ let isSyncing = $state(false); let syncMessage = $state(''); let theme = $state(localStorage.getItem('theme') || 'dark'); + let summaryPanel = $state(null); function toggleTheme() { theme = theme === 'dark' ? 'light' : 'dark'; @@ -59,10 +60,8 @@ $effect(() => { if (activeTab) loadVideos(); }); $effect(() => { - if (selectedVideo) { - tick().then(() => { - document.getElementById('summary-panel')?.scrollTo({ top: 0, behavior: 'instant' }); - }); + if (selectedVideo && summaryPanel) { + tick().then(() => summaryPanel.scrollTop = 0); } }); onMount(() => { @@ -114,7 +113,7 @@ } -
+
@@ -135,7 +134,7 @@
-
+
-
+
{#if selectedVideo}