Skip to content

Instantly share code, notes, and snippets.

@malihassan20

malihassan20/tour-detail.js Secret

Created Jan 17, 2018
Embed
What would you like to do?
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