Change directory layout

This commit is contained in:
Kimmo Puputti 2017-01-05 20:53:20 +02:00
parent 9f5f24bfee
commit a6907b7139
8 changed files with 17 additions and 17 deletions

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Match, Miss, Redirect } from 'react-router';
import * as pages from './pages';
import { HomePage, SearchPage, NotFoundPage } from './containers';
const RedirectTestPage = () => (
<Redirect to="/" />
@ -8,10 +8,10 @@ const RedirectTestPage = () => (
const Routes = () => (
<div>
<Match exactly pattern="/" component={ pages.Home } />
<Match exactly pattern="/search" component={ pages.Search } />
<Match exactly pattern="/" component={ HomePage } />
<Match exactly pattern="/search" component={ SearchPage } />
<Match exactly pattern="/home" component={ RedirectTestPage } />
<Miss component={ pages.NotFound } />
<Miss component={ NotFoundPage } />
</div>
);

View file

@ -1,4 +1,4 @@
import Page from './Page';
import Page from './Page/Page';
export {
Page

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Link } from 'react-router';
import { Page } from '../components';
import { Page } from '../../components';
export default () => (
<Page title="Index page">

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Link } from 'react-router';
import { Page } from '../components';
import { Page } from '../../components';
export default () => (
<Page title="Page not found">

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Link } from 'react-router';
import { Page } from '../components';
import { Page } from '../../components';
export default () => (
<Page title="Search page">

9
src/containers/index.js Normal file
View file

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

View file

@ -1,9 +0,0 @@
import Home from './Home';
import Search from './Search';
import NotFound from './NotFound';
export {
Home,
Search,
NotFound,
};