summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app.js3
-rw-r--r--src/components/loading/index.js5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index 2a64865..5868b85 100644
--- a/src/app.js
+++ b/src/app.js
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
+import Loading from './components/loading';
import { persist, store } from './store';
import AppRoutes from './router';
@@ -9,7 +10,7 @@ class App extends Component {
render() {
return (
<Provider store={ store }>
- <PersistGate loading={ () => '<h1>Loading..</h1>' } persistor={ persist }>
+ <PersistGate loading={ <Loading/> } persistor={ persist }>
<AppRoutes/>
</PersistGate>
</Provider>
diff --git a/src/components/loading/index.js b/src/components/loading/index.js
new file mode 100644
index 0000000..1c81869
--- /dev/null
+++ b/src/components/loading/index.js
@@ -0,0 +1,5 @@
+import React from 'react';
+
+export default () => (
+ <h1>Loading</h1>
+);