Redirekt auf HOME, wenn keine Contentseite gefunden wurde.

This commit is contained in:
2022-06-03 10:49:16 +02:00
parent cabaaef456
commit 432d21daeb
4 changed files with 148 additions and 152 deletions

View File

@@ -54,6 +54,11 @@
}
content = null
}
// Redirect to HOME if no content has been found. So the page 404 content will never shown.
if (!content) {
navigate("/")
}
})
.finally(() => {
loading = false
@@ -79,6 +84,7 @@
{#if loading}
<!-- Loader -->
{:else if content}
<!-- {JSON.stringify(content)} -->
{#each content.blocks || [] as b}
<h1>{b.article.content.title}</h1>
{JSON.stringify(b)}