fix: Svelte 5 runes mode 호환 ($: → $derived/$effect)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-04-03 09:01:00 +09:00
parent 1a2b3b49af
commit b04e1de8a6

View File

@@ -20,14 +20,14 @@
authChecked = true; authChecked = true;
}); });
$: { $effect(() => {
if (browser && authChecked && !$isAuthenticated && !PUBLIC_PATHS.some(p => $page.url.pathname.startsWith(p))) { if (browser && authChecked && !$isAuthenticated && !PUBLIC_PATHS.some(p => $page.url.pathname.startsWith(p))) {
goto('/login'); goto('/login');
} }
} });
// 사이드바 표시 여부 // 사이드바 표시 여부
$: showSidebar = $isAuthenticated && !NO_SIDEBAR_PATHS.some(p => $page.url.pathname.startsWith(p)); let showSidebar = $derived($isAuthenticated && !NO_SIDEBAR_PATHS.some(p => $page.url.pathname.startsWith(p)));
// 키보드 단축키 // 키보드 단축키
function handleKeydown(e) { function handleKeydown(e) {