xsnippet logotype

xsnippet

#362502, Untitled [ Diff ]

by Guest
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/src/routes.jsx b/src/routes.jsx
index e2b836b..8b124dc 100644
--- a/src/routes.jsx
+++ b/src/routes.jsx
@@ -1,5 +1,6 @@
 import React from 'react';
 import { Router, Route, IndexRoute, browserHistory } from 'react-router';
+import { createHistory, useBasename } from 'history'

 import Main from 'Main';
 import TaskEdit from 'TaskEdit';
@@ -8,9 +9,13 @@ import CategoryWrapper from 'CategoryWrapper';
 import TaskAdd from 'TaskAdd';
 import TaskList from 'TaskList';

+const history = useBasename(createHistory)({
+  basename: '/dist'
+})
+
 const Routes = () => {
   return (
-    <Router history={browserHistory}>
+    <Router history={history}>
       <Route path="/" component={Main}>
         <IndexRoute
           components={{