Fix undefined heading issue

pull/8286/head
Puru Vijay 4 years ago
parent b660ba796a
commit 1df8774e65

@ -4,11 +4,16 @@
/** @type {import('./$types').LayoutServerData}*/
export let data;
$: title = data.sections.find((val) => val.path === $page.url.pathname)?.title;
</script>
<div class="container">
<div class="page content ">
<h1>{data.sections.find((val) => val.path === $page.url.pathname)?.title}</h1>
{#if title}
<h1>{title}</h1>
{/if}
<slot />
</div>

@ -0,0 +1 @@
export const prerender = true;
Loading…
Cancel
Save