CheckoutPage

This commit is contained in:
Vesa Luusua 2017-01-11 00:28:17 +02:00
parent 8d9695a91c
commit 66b1887c82
3 changed files with 15 additions and 0 deletions

View file

@ -1,6 +1,7 @@
import React from 'react';
import { Match, Miss, Redirect } from 'react-router';
import {
CheckoutPage,
LandingPage,
ListingPage,
ProfilePage,
@ -26,6 +27,9 @@ const Routes = () => (
{/* profile / storefront view */}
<Match exactly pattern="/u/:displayName" component={ ProfilePage } />
<Match exactly pattern="/u" component={ RedirectLandingPage } />
{/* checkout */}
<Match exactly pattern="/checkout/:listingId" component={ CheckoutPage } />
<Miss component={ NotFoundPage } />
</div>
);

View file

@ -0,0 +1,9 @@
import React from 'react';
import { Link } from 'react-router';
import { Page } from '../../components';
export default ({ params }) => (
<Page title={ `Checkout page: ${params.listingId}`}>
<Link to={ `/order/12345` }><button>Pay</button></Link>
</Page>
);

View file

@ -1,3 +1,4 @@
import CheckoutPage from './CheckoutPage/CheckoutPage';
import LandingPage from './LandingPage/LandingPage';
import ListingPage from './ListingPage/ListingPage';
import ProfilePage from './ProfilePage/ProfilePage';
@ -5,6 +6,7 @@ import SearchPage from './SearchPage/SearchPage';
import NotFoundPage from './NotFoundPage/NotFoundPage';
export {
CheckoutPage,
LandingPage,
ListingPage,
ProfilePage,