Skip to content

Commit

Permalink
🚧 SPA へ移行
Browse files Browse the repository at this point in the history
  • Loading branch information
wappon28dev committed Apr 8, 2024
1 parent f71a828 commit 1174352
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
node = "21"
bun = "1.1.0"
bun = "latest"
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@astrojs/react": "^3.0.10",
"@astrojs/sitemap": "^3.1.1",
"@hookform/resolvers": "^3.3.4",
"@hotwired/turbo": "^8.0.4",
"@iconify-json/mdi": "^1.1.64",
"@iconify/react": "^4.1.1",
"@marsidev/react-turnstile": "^0.5.3",
Expand All @@ -33,13 +34,13 @@
"astro-seo": "^0.8.3",
"cheerio": "1.0.0-rc.12",
"highlight.js": "^11.9.0",
"hono": "^4.1.5",
"image-size": "^1.1.1",
"microcms-js-sdk": "^2.7.0",
"microcms-typescript": "^1.0.14",
"nanostores": "^0.10.0",
"neverthrow": "^6.1.0",
"react": "^18.2.0",
"hono": "^4.1.5",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.0",
"react-svg": "^16.1.33",
Expand Down
2 changes: 2 additions & 0 deletions client/src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const { seo, style, header } = Astro.props;
</p.body>

<script>
import "../turbo-router.js";

const elems =
document.querySelectorAll<HTMLAnchorElement>("h2 > a, h3 > a");
elems.forEach((elem) => {
Expand Down
3 changes: 3 additions & 0 deletions client/src/turbo-router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as Turbo from "@hotwired/turbo";

Turbo.start();

0 comments on commit 1174352

Please sign in to comment.