Skip to content

Instantly share code, notes, and snippets.

@malihassan20
Last active January 18, 2018 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malihassan20/c8238eb56a2003c8ba15e7f311e10bcd to your computer and use it in GitHub Desktop.
Save malihassan20/c8238eb56a2003c8ba15e7f311e10bcd to your computer and use it in GitHub Desktop.
nextJs-tour-diary-app\pages\index.js
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