Tidy dynamic title handling

This commit is contained in:
2026-03-10 12:27:24 +00:00
parent d82592cebf
commit ea2468092c
3 changed files with 7 additions and 4 deletions

View File

@@ -17,7 +17,7 @@
]
const activePath = $derived(page.url?.pathname ?? '');
const isHome = $derived(page.url?.pathname ?? '' === '/');
const isHome = $derived(page.url.pathname === '/');
const moreIcon = IconDots;
@@ -36,7 +36,7 @@
{/if}
</a>
{#if !isHome}
<h1 class="page-title">{headerState?.title ?? ""}</h1>
<h1 class="page-title">{page?.data?.title ?? ""}</h1>
{/if}
</header>

View File

@@ -1,4 +1,2 @@
<script lang="ts">
import headerState from '$lib/Header/Header.svelte.ts'
headerState.title = "About"
</script>

View File

@@ -0,0 +1,5 @@
export const load = () => {
return {
title: "About",
};
};