From 92a7c8a59705013ec484f5974fdb7201190a5812 Mon Sep 17 00:00:00 2001 From: Richard Willis Date: Thu, 6 Aug 2020 14:05:50 +0100 Subject: [PATCH] Use hash history --- src/components/ui/App/App.tsx | 5 +++-- src/router/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/ui/App/App.tsx b/src/components/ui/App/App.tsx index 7b05e32..e091ef3 100644 --- a/src/components/ui/App/App.tsx +++ b/src/components/ui/App/App.tsx @@ -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 ( - + diff --git a/src/router/index.ts b/src/router/index.ts index 5aafdbd..b9adf23 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,2 +1,2 @@ -import { createBrowserHistory } from 'history'; -export const history = createBrowserHistory(); +import { createHashHistory } from 'history'; +export const history = createHashHistory();