email confirm template, fix admin login, try fix translation error logs

This commit is contained in:
Dobromir Popov
2024-04-30 13:18:38 +03:00
parent 5135a95db7
commit f303ae193c
5 changed files with 106 additions and 43 deletions

View File

@ -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
}
};
}