mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Change directory layout
This commit is contained in:
parent
9f5f24bfee
commit
a6907b7139
8 changed files with 17 additions and 17 deletions
|
|
@ -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>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Page from './Page';
|
||||
import Page from './Page/Page';
|
||||
|
||||
export {
|
||||
Page
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
@ -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">
|
||||
|
|
@ -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
9
src/containers/index.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import HomePage from './HomePage/HomePage';
|
||||
import SearchPage from './SearchPage/SearchPage';
|
||||
import NotFoundPage from './NotFoundPage/NotFoundPage';
|
||||
|
||||
export {
|
||||
HomePage,
|
||||
SearchPage,
|
||||
NotFoundPage,
|
||||
};
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
import Home from './Home';
|
||||
import Search from './Search';
|
||||
import NotFound from './NotFound';
|
||||
|
||||
export {
|
||||
Home,
|
||||
Search,
|
||||
NotFound,
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue