Skip to content

Instantly share code, notes, and snippets.

@weianofsteel
Created February 23, 2021 10:36
Show Gist options
  • Save weianofsteel/72879d97c1559da079295eb68553c2f6 to your computer and use it in GitHub Desktop.
Save weianofsteel/72879d97c1559da079295eb68553c2f6 to your computer and use it in GitHub Desktop.
_app.js
import App from 'next/app'
import React from 'react';
import Head from 'next/head'
import { appWithTranslation } from '../i18n'
import '../css/main.css'
const MyApp = ({ Component, pageProps }) => {
return(
<React.Fragment>
<Head>
<title>next-i18next Sample</title>
</Head>
<Component {...pageProps} />
</React.Fragment>
)
}
MyApp.getInitialProps = async (appContext) => ({ ...await App.getInitialProps(appContext) })
export default appWithTranslation(MyApp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment