Skip to content

Commit

Permalink
🔧 chore: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jul 17, 2023
1 parent 9be079a commit 6c4b203
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ module.exports = {
defaultLocale: i18n.entryLocale,
locales: [i18n.entryLocale, ...i18n.outputLocales],
},
localePath:
typeof window === 'undefined' ? require('node:path').resolve('./', i18n.output) : '/locales',
react: { useSuspense: false },
reloadOnPrerender: process.env.NODE_ENV === 'development',
strictMode: true,
};
3 changes: 2 additions & 1 deletion src/pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Analytics } from '@vercel/analytics/react';
import { appWithTranslation } from 'next-i18next';
import type { AppProps } from 'next/app';

import i18nConfig from '@/../next-i18next.config';
import Layout from '@/layout';

export default appWithTranslation(({ Component, pageProps }: AppProps) => {
Expand All @@ -11,4 +12,4 @@ export default appWithTranslation(({ Component, pageProps }: AppProps) => {
<Analytics />
</Layout>
);
});
}, i18nConfig);
2 changes: 1 addition & 1 deletion src/pages/_document.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Document, { DocumentContext, Head, Html, Main, NextScript } from 'next/do
import i18nextConfig from '../../next-i18next.config.js';

class MyDocument extends Document {
static async getInitialProps(ctx: DocumentContext) {
static async getStaticProps(ctx: DocumentContext) {
const page = await ctx.renderPage({
enhanceApp: (App) => (props) =>
(
Expand Down

0 comments on commit 6c4b203

Please sign in to comment.