mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
25 lines
495 B
JavaScript
25 lines
495 B
JavaScript
|
import React from 'react'
|
||
|
import Helmet from 'react-helmet'
|
||
|
|
||
|
export default class About extends React.Component {
|
||
|
static async getInitialProps ({ req }) {
|
||
|
if (req) {
|
||
|
Helmet.renderStatic()
|
||
|
}
|
||
|
return { title: 'About' }
|
||
|
}
|
||
|
|
||
|
render () {
|
||
|
const { title } = this.props
|
||
|
return (
|
||
|
<div>
|
||
|
<Helmet
|
||
|
title={`${title} | Hello next.js!`}
|
||
|
meta={[{ property: 'og:title', content: title }]}
|
||
|
/>
|
||
|
About the World
|
||
|
</div>
|
||
|
)
|
||
|
}
|
||
|
}
|