From 154bda33fe604d88813b11c50a1486c9b03bda24 Mon Sep 17 00:00:00 2001 From: Sol Irvine Date: Mon, 9 Oct 2023 07:34:59 +0900 Subject: [PATCH] more locale updates --- app/[locale]/layout.tsx | 2 +- app/[locale]/opengraph-image.tsx | 1 + messages/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index 13e6a7067..43ccc6d15 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -71,7 +71,7 @@ const noto = Noto_Serif_JP({ }); export function generateStaticParams() { - return [{ locale: 'en' }, { locale: 'ja' }]; + return [{ locale: 'ja' }, { locale: 'en' }]; } export default async function RootLayout({ diff --git a/app/[locale]/opengraph-image.tsx b/app/[locale]/opengraph-image.tsx index 23762cbdd..434a936b8 100644 --- a/app/[locale]/opengraph-image.tsx +++ b/app/[locale]/opengraph-image.tsx @@ -1,6 +1,7 @@ import OpengraphImage from 'components/opengraph-image'; export const runtime = 'edge'; +export const revalidate = 300; // 5 minutes in seconds export default async function Image() { return await OpengraphImage(); diff --git a/messages/index.ts b/messages/index.ts index c30991df6..b3954444f 100644 --- a/messages/index.ts +++ b/messages/index.ts @@ -4,8 +4,8 @@ import 'server-only'; // We enumerate all dictionaries here for better linting and typescript support // We also get the default import for cleaner types const dictionaries = { - en: () => import('./en.json').then((module) => module.default), - ja: () => import('./ja.json').then((module) => module.default) + ja: () => import('./ja.json').then((module) => module.default), + en: () => import('./en.json').then((module) => module.default) }; export const getDictionary = async (locale: SupportedLocale) =>