Skip to content

Instantly share code, notes, and snippets.

@malihassan20
Created January 17, 2018 21:19
Show Gist options
  • Save malihassan20/1b337804f371168d44f49bbd5ba709cd to your computer and use it in GitHub Desktop.
Save malihassan20/1b337804f371168d44f49bbd5ba709cd to your computer and use it in GitHub Desktop.
nextJs-tour-diary-app\pages\tour-detail.js
import React, { Component } from 'react';
import { Layout } from 'antd';
import { withReduxSaga } from '../store/store';
import { getTourDetail } from '../store/actions';
import Wrapper from '../components/wrapper';
import TourDetails from '../components/Tour/TourDetail';
const { Content } = Layout;
class TourDetail extends Component {
static async getInitialProps({ store, query }) {
await store.dispatch(getTourDetail(query.tourId));
}
render() {
return (
<Wrapper title="Tour Detail">
<Layout className="layout content-body-adj">
<Content>
<TourDetails />
</Content>
</Layout>
</Wrapper>
);
}
}
export default withReduxSaga(TourDetail);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment