Refactor more, fix and design 404
This commit is contained in:
parent
7de374e00b
commit
8521baa6d9
11 changed files with 223 additions and 138 deletions
|
@ -5,6 +5,7 @@ import Home from './home';
|
|||
import Share from './share';
|
||||
import Head from './head';
|
||||
import ErrorView from './error';
|
||||
import NotFound from './notfound';
|
||||
|
||||
const App = React.createClass({
|
||||
render: function () {
|
||||
|
@ -27,7 +28,7 @@ const routes = (
|
|||
<Route name='home' handler={App} path='/'>
|
||||
<DefaultRoute handler={Home} />
|
||||
<Route name='share' path=':service/:type/:id' handler={Share}/>
|
||||
<NotFoundRoute handler={ErrorView}/>
|
||||
<NotFoundRoute handler={NotFound}/>
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
27
views/notfound.js
Normal file
27
views/notfound.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
import React from 'react';
|
||||
import Head from './head';
|
||||
import Foot from './foot';
|
||||
|
||||
export default React.createClass({
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<html>
|
||||
<Head {...this.props} />
|
||||
<body>
|
||||
<div className='error vertical-center'>
|
||||
<div className='container main'>
|
||||
<div className='row'>
|
||||
<div className='col-md-12'>
|
||||
<h2>404</h2>
|
||||
<h1>Sorry, it looks like the page you asked for is gone.</h1>
|
||||
<a href='/'>Take Me Home</a> or <a href='https://www.youtube.com/watch?v=gnnIrTLlLyA' target='_blank'>Show Me the Wubs</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue