Skip to content

Commit

Permalink
move address-to-english page to static
Browse files Browse the repository at this point in the history
  • Loading branch information
kane50613 committed Apr 26, 2024
1 parent 64b6709 commit ded4e84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/pages/[lang]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ for (const [fromId, from] of Object.entries(calculatorConfig)) {
<p>{t("global.description")}</p>
<h2 class="flex items-center gap-2"><Sparkles />{t("home.recommended")}</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<HomeItemContainer href={`/${code}/address-to-english`}>
<HomeItemContainer href="/zh-tw/address-to-english">
<Languages />
<p>台灣中華郵政地址轉英文</p>
</HomeItemContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
---
import BaseLayout from "@/layouts/base-layout.astro";
import { createTranslation } from "@/utils/language";
import Adsense from "@/components/adsense.astro";
export { getStaticPaths } from "@/utils/language";
import { AddressToEnglishInput } from "@/components/address-to-english-input";
import BaseLayout from "../../layouts/base-layout.astro";
import { createTranslation } from "../../utils/language";
import Adsense from "../../components/adsense.astro";
export { getStaticPaths } from "../../utils/language";
import { AddressToEnglishInput } from "../../components/address-to-english-input";
if (Astro.params.lang !== "zh-tw")
return Astro.redirect(Astro.url.pathname.replace(Astro.params.lang, "zh-tw"));
const t = createTranslation(Astro.params.lang);
const t = createTranslation("zh-tw");
---

<BaseLayout
Expand Down

0 comments on commit ded4e84

Please sign in to comment.