Merge pull request #2925 from pterodactyl/fix/router-hot-reload

Fix hot-reloading breaking react-router-dom
This commit is contained in:
Dane Everitt 2020-12-28 11:02:45 -08:00 committed by GitHub
commit 9f0708f86b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -12,7 +12,7 @@ import ProgressBar from '@/components/elements/ProgressBar';
import NotFound from '@/components/screens/NotFound';
import tw, { GlobalStyles as TailwindGlobalStyles } from 'twin.macro';
import GlobalStylesheet from '@/assets/css/GlobalStylesheet';
import { createBrowserHistory } from 'history';
import { history } from '@/components/history';
import { setupInterceptors } from '@/api/interceptors';
interface ExtendedWindow extends Window {
@ -31,8 +31,6 @@ interface ExtendedWindow extends Window {
};
}
const history = createBrowserHistory({ basename: '/' });
setupInterceptors(history);
const Pageview = () => {

View file

@ -0,0 +1,3 @@
import { createBrowserHistory } from 'history';
export const history = createBrowserHistory({ basename: '/' });