Skip to content

Commit 9f0708f

Browse files
authored
Merge pull request pterodactyl#2925 from pterodactyl/fix/router-hot-reload
Fix hot-reloading breaking react-router-dom
2 parents dbb6f69 + b19406b commit 9f0708f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

resources/scripts/components/App.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ProgressBar from '@/components/elements/ProgressBar';
1212
import NotFound from '@/components/screens/NotFound';
1313
import tw, { GlobalStyles as TailwindGlobalStyles } from 'twin.macro';
1414
import GlobalStylesheet from '@/assets/css/GlobalStylesheet';
15-
import { createBrowserHistory } from 'history';
15+
import { history } from '@/components/history';
1616
import { setupInterceptors } from '@/api/interceptors';
1717

1818
interface ExtendedWindow extends Window {
@@ -31,8 +31,6 @@ interface ExtendedWindow extends Window {
3131
};
3232
}
3333

34-
const history = createBrowserHistory({ basename: '/' });
35-
3634
setupInterceptors(history);
3735

3836
const Pageview = () => {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { createBrowserHistory } from 'history';
2+
3+
export const history = createBrowserHistory({ basename: '/' });

0 commit comments

Comments
 (0)