From 77362e3d6b64d746619fb16f738d887ec2db92bd Mon Sep 17 00:00:00 2001 From: icefire <1028247921@qq.com> Date: Wed, 16 Oct 2024 15:19:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=85=8D=E7=BD=AE=E9=9D=99=E6=80=81?= =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.mjs | 2 +- src/app/[lang]/home/page.tsx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index c3bec89..15eff7c 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - + output: 'export' }; export default nextConfig; diff --git a/src/app/[lang]/home/page.tsx b/src/app/[lang]/home/page.tsx index dac298f..cd7524c 100644 --- a/src/app/[lang]/home/page.tsx +++ b/src/app/[lang]/home/page.tsx @@ -1,3 +1,11 @@ +export async function generateStaticParams() { + return ['en', 'zh'].map((post) => ({ + lang: post, + })) +} + + + import Image from "next/image"; import { getDictionary } from '@/dictionaries'; import Form from "./components/form"; @@ -12,6 +20,9 @@ export type PropsType = { lang: string; }; } + + + export default async function Home (props: PropsType) { const lang = props.params.lang; const dict = await getDictionary(lang);