-
-
Save malihassan20/c8238eb56a2003c8ba15e7f311e10bcd to your computer and use it in GitHub Desktop.
nextJs-tour-diary-app\pages\index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Layout } from 'antd'; | |
import { withReduxSaga } from '../store/store'; | |
import { getTour } from '../store/actions'; | |
import Wrapper from '../components/wrapper'; | |
import Tour from '../components/Tour/Tour'; | |
const { Content } = Layout; | |
class Index extends Component { | |
static async getInitialProps({ store }) { | |
await store.dispatch(getTour()); | |
} | |
render() { | |
return ( | |
<Wrapper title="Cosmic JS Tour Diary App"> | |
<Layout className="layout content-body-adj"> | |
<Content> | |
<Tour /> | |
</Content> | |
</Layout> | |
</Wrapper> | |
); | |
} | |
} | |
export default withReduxSaga(Index); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment