Skip to content

Commit

Permalink
Merge pull request #22 from badsyntax/fix-routing
Browse files Browse the repository at this point in the history
Use hash history
  • Loading branch information
badsyntax authored Aug 6, 2020
2 parents 924ef44 + 92a7c8a commit e66726d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/ui/App/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import { Route, Router, Switch } from 'react-router-dom';
import { history } from '../../../router';
import { LoginRoute } from '../../routes/LoginRoute/LoginRoute';
import { MainRoute } from '../../routes/MainRoute/MainRoute';
import { PrivateRoute } from '../../routes/PrivateRoute/PrivateRoute';

export const App: React.FunctionComponent = () => {
return (
<Router>
<Router history={history}>
<Switch>
<Route exact path={LoginRoute.path}>
<LoginRoute />
Expand Down
4 changes: 2 additions & 2 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import { createBrowserHistory } from 'history';
export const history = createBrowserHistory();
import { createHashHistory } from 'history';
export const history = createHashHistory();

0 comments on commit e66726d

Please sign in to comment.