summaryrefslogtreecommitdiff
path: root/src/main/js
diff options
context:
space:
mode:
authorVictor Chabbert <chabbertvi@eisti.eu>2016-12-18 18:13:52 +0100
committerVictor Chabbert <chabbertvi@eisti.eu>2016-12-18 18:13:52 +0100
commitfa090ba63356fb4e99e32ba39cfdef0e08c87961 (patch)
tree85fe44aa7cc55af133ca869dd8dfacb8dc6c0321 /src/main/js
parentUpdate redux-devtools extension integration (diff)
downloadseven-wonders-fa090ba63356fb4e99e32ba39cfdef0e08c87961.tar.gz
seven-wonders-fa090ba63356fb4e99e32ba39cfdef0e08c87961.tar.bz2
seven-wonders-fa090ba63356fb4e99e32ba39cfdef0e08c87961.zip
Refactor 404 stateless function
Diffstat (limited to 'src/main/js')
-rw-r--r--src/main/js/src/components/errors/Error404.js8
-rw-r--r--src/main/js/src/global-styles.css (renamed from src/main/js/src/index.css)0
-rw-r--r--src/main/js/src/index.js10
3 files changed, 11 insertions, 7 deletions
diff --git a/src/main/js/src/components/errors/Error404.js b/src/main/js/src/components/errors/Error404.js
new file mode 100644
index 00000000..13ce5ae5
--- /dev/null
+++ b/src/main/js/src/components/errors/Error404.js
@@ -0,0 +1,8 @@
+import React from 'react'
+import { Link } from 'react-router'
+
+const Error404 = () => <div>
+ <h1>No Match</h1>
+ <Link to="/">Take me back home ! 🏠</Link>
+</div>
+export default Error404 \ No newline at end of file
diff --git a/src/main/js/src/index.css b/src/main/js/src/global-styles.css
index b4cc7250..b4cc7250 100644
--- a/src/main/js/src/index.css
+++ b/src/main/js/src/global-styles.css
diff --git a/src/main/js/src/index.js b/src/main/js/src/index.js
index cfe654b5..f2be8a53 100644
--- a/src/main/js/src/index.js
+++ b/src/main/js/src/index.js
@@ -7,19 +7,15 @@ import configureStore from './store'
const initialState = {}
const store = configureStore(initialState)
-import './index.css'
+import './global-styles.css'
import App from './containers/App'
-
-const NoMatch = () => {
- return <h1>No Match</h1>
-}
-
+import Error404 from './components/errors/Error404'
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<div className="app">
<Match exactly pattern="/" component={App} />
- <Miss component={NoMatch} />
+ <Miss component={Error404} />
</div>
</BrowserRouter>
</Provider>,
bgstack15