Skip to content

Commit f9f15c3

Browse files
committed
404: use Head + BaseLayout
1 parent 1ce03c8 commit f9f15c3

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/pages/404.astro

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
---
2-
import Layout from "../layouts/BaseLayout.astro";
2+
import Head from "@components/Head/index.astro";
3+
import BaseLayout from "../layouts/BaseLayout.astro";
4+
import { getCurrentLocale, getUiTranslator } from "../i18n/utils.ts";
5+
const currentLocale = getCurrentLocale(Astro.url.pathname);
6+
// const t = await getUiTranslator(currentLocale);
37
---
48

5-
<Layout title="404: Page Not Found">
6-
<main class="flex flex-col items-start gap-8 py-8 px-2 prose max-w-none">
9+
<Head title="404: Page Not Found" locale={currentLocale} />
10+
11+
<BaseLayout title="About">
12+
<section class="flex flex-col items-start gap-8 py-8 px-2 prose max-w-none">
713
<p>
814
Sorry, we couldn't find your exact page
915
<code id="display-path"></code>.
@@ -16,7 +22,7 @@ import Layout from "../layouts/BaseLayout.astro";
1622
<a href="/" class="btn secondary">go home</a>
1723
</div>
1824
</p>
19-
</main>
25+
</section>
2026
<script is:inline>
2127
(function update404PageDetails() {
2228
function getLastPathSegment(path) {
@@ -46,4 +52,4 @@ import Layout from "../layouts/BaseLayout.astro";
4652
}
4753
})();
4854
</script>
49-
</Layout>
55+
</BaseLayout>

0 commit comments

Comments
 (0)