Skip to content

Instantly share code, notes, and snippets.

@weianofsteel
Last active April 17, 2021 08:53
Show Gist options
  • Save weianofsteel/c1605ff6179724b3ef49473285f1363e to your computer and use it in GitHub Desktop.
Save weianofsteel/c1605ff6179724b3ef49473285f1363e to your computer and use it in GitHub Desktop.
index.js
import React from 'react'
import Sample from '../../component/Sample'
import { withTranslation } from '../../i18n'
import PropTypes from 'prop-types'
const SamplePage = ({t}) => {
return(
<Sample/>
)
}
SamplePage.getInitialProps = async () => ({
namespacesRequired: ['sample'],
})
SamplePage.propTypes = {
t: PropTypes.func.isRequired,
}
export default withTranslation('sample')(SamplePage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment