Merge pull request #2925 from pterodactyl/fix/router-hot-reload
Fix hot-reloading breaking react-router-dom
This commit is contained in:
commit
9f0708f86b
2 changed files with 4 additions and 3 deletions
|
@ -12,7 +12,7 @@ import ProgressBar from '@/components/elements/ProgressBar';
|
||||||
import NotFound from '@/components/screens/NotFound';
|
import NotFound from '@/components/screens/NotFound';
|
||||||
import tw, { GlobalStyles as TailwindGlobalStyles } from 'twin.macro';
|
import tw, { GlobalStyles as TailwindGlobalStyles } from 'twin.macro';
|
||||||
import GlobalStylesheet from '@/assets/css/GlobalStylesheet';
|
import GlobalStylesheet from '@/assets/css/GlobalStylesheet';
|
||||||
import { createBrowserHistory } from 'history';
|
import { history } from '@/components/history';
|
||||||
import { setupInterceptors } from '@/api/interceptors';
|
import { setupInterceptors } from '@/api/interceptors';
|
||||||
|
|
||||||
interface ExtendedWindow extends Window {
|
interface ExtendedWindow extends Window {
|
||||||
|
@ -31,8 +31,6 @@ interface ExtendedWindow extends Window {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const history = createBrowserHistory({ basename: '/' });
|
|
||||||
|
|
||||||
setupInterceptors(history);
|
setupInterceptors(history);
|
||||||
|
|
||||||
const Pageview = () => {
|
const Pageview = () => {
|
||||||
|
|
3
resources/scripts/components/history.ts
Normal file
3
resources/scripts/components/history.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import { createBrowserHistory } from 'history';
|
||||||
|
|
||||||
|
export const history = createBrowserHistory({ basename: '/' });
|
Loading…
Reference in a new issue