1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-react-helmet/pages/about.js
2017-09-12 14:55:40 +02:00

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>
)
}
}