Skip to content

Instantly share code, notes, and snippets.

@malihassan20

malihassan20/index.js Secret

Last active Jan 18, 2018
Embed
What would you like to do?
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