Skip to content

Commit 66dadb6

Browse files
committed
enable client-side routing
1 parent 4c6f21d commit 66dadb6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/layouts/GlobalLayout.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import { ClientRouter } from "astro:transitions";
23
import Footer from "../components/Footer.astro";
34
import Header from "../components/Header.astro";
45
import Logo from "../images/favicon.png";
@@ -18,11 +19,12 @@ const { title, description, focus, image } = Astro.props;
1819
<html lang="ja" class="bg-gray-50 text-gray-800" data-theme="light">
1920
<Meta {title} {description} image={image ?? Logo} />
2021
<body class="min-h-full w-full">
21-
<Header {focus} />
22-
<slot />
23-
<Footer />
2422
<style is:global>
2523
@import "../global.css";
2624
</style>
25+
<Header {focus} />
26+
<slot />
27+
<Footer />
28+
<ClientRouter />
2729
</body>
2830
</html>

0 commit comments

Comments
 (0)