17 lines
481 B
Plaintext
17 lines
481 B
Plaintext
---
|
|
import MainLayout from "../layouts/MainLayout.astro";
|
|
import { getPageSingle } from "../services/api";
|
|
const { slug } = Astro.params;
|
|
|
|
const page = await getPageSingle(slug!);
|
|
if (!page) return Astro.redirect("/404");
|
|
if (page.slug == "home") return Astro.redirect("/");
|
|
---
|
|
|
|
<MainLayout title={page.title} layout={page.layout} description="">
|
|
{page.title}
|
|
{page.layout}
|
|
<!-- {homePage && <RenderPage page={homePage} />}
|
|
{!homePage && <NoHomePage />} -->
|
|
</MainLayout>
|