Skip to content

Commit 286c0b5

Browse files
committed
feat: 言語切り替えの順を固定化
jaを先頭にするため降順
1 parent 1858f0e commit 286c0b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2025/src/components/LanguagePicker.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { base } from "astro:config/client"
55
const pathname = Astro.url.pathname.replace(import.meta.env.BASE_URL, "");
66
---
77
<ul class="language-picker">
8-
{Object.entries(languages).map(([lang, label]) => (
8+
{Object.entries(languages).sort((a, b) => a < b ? 0 : -1).map(([lang, label]) => (
99
<li class:list= {[{ active: pathname.startsWith(`/${label}`) }]} >
1010
<a href={`${base}/${lang}/`}>{label}</a>
1111
</li>

0 commit comments

Comments
 (0)