email confirm template, fix admin login, try fix translation error logs
This commit is contained in:
@ -117,16 +117,16 @@ export default function App({ Component, pageProps: { session, ...pageProps }, }
|
||||
}
|
||||
|
||||
// build time localization. Is it working for _app.tsx?d
|
||||
// export async function getStaticProps(context) {
|
||||
// const messages = (await import(`../content/i18n/${locale}.json`)).default;
|
||||
// console.log("Loaded messages for locale:", locale, messages);
|
||||
// return {
|
||||
// props: {
|
||||
// // You can get the messages from anywhere you like. The recommended
|
||||
// // pattern is to put them in JSON files separated by locale and read
|
||||
// // the desired one based on the `locale` received from Next.js.
|
||||
// // messages: (await import(`../content/i18n/${context.locale}.json`)).default
|
||||
// messages
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
export async function getStaticProps(context) {
|
||||
const messages = (await import(`../content/i18n/${context.locale}.json`)).default;
|
||||
console.log("Loaded messages for locale:", context.locale, messages);
|
||||
return {
|
||||
props: {
|
||||
// You can get the messages from anywhere you like. The recommended
|
||||
// pattern is to put them in JSON files separated by locale and read
|
||||
// the desired one based on the `locale` received from Next.js.
|
||||
// messages: (await import(`../content/i18n/${context.locale}.json`)).default
|
||||
messages
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user