LandingPage instead of HomePage

This commit is contained in:
Vesa Luusua 2017-01-11 00:11:39 +02:00
parent e5fef47e6d
commit 7671dd1b0e
3 changed files with 7 additions and 10 deletions

View file

@ -1,18 +1,15 @@
import React from 'react';
import { Match, Miss, Redirect } from 'react-router';
import { HomePage, SearchPage, NotFoundPage } from './containers';
import { LandingPage, SearchPage, NotFoundPage } from './containers';
// This is only used for testing that redirects work correct in the
// client and when rendering in the server.
const RedirectTestPage = () => (
<Redirect to="/" />
);
const RedirectLandingPage = () => <Redirect to="/" />;
const Routes = () => (
<div>
<Match exactly pattern="/" component={ HomePage } />
<Match exactly pattern="/search" component={ SearchPage } />
<Match exactly pattern="/home" component={ RedirectTestPage } />
<Match exactly pattern="/" component={ LandingPage } />
<Miss component={ NotFoundPage } />
</div>
);

View file

@ -3,7 +3,7 @@ import { Link } from 'react-router';
import { Page } from '../../components';
export default () => (
<Page title="Index page">
<Link to="/search">search page</Link>
<Page title="Landing page">
<Link to="/s?location=helsinki">Find studios</Link>
</Page>
);

View file

@ -1,9 +1,9 @@
import HomePage from './HomePage/HomePage';
import LandingPage from './LandingPage/LandingPage';
import SearchPage from './SearchPage/SearchPage';
import NotFoundPage from './NotFoundPage/NotFoundPage';
export {
HomePage,
LandingPage,
SearchPage,
NotFoundPage,
};