Skip to content

Commit c2a9234

Browse files
author
GeoCodeCrafter
committed
fix: switch to MemoryRouter so routes resolve correctly in Electron file:// context
1 parent 1887457 commit c2a9234

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/main.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom/client';
3-
import { BrowserRouter } from 'react-router-dom';
3+
import { MemoryRouter } from 'react-router-dom';
44
import App from './App';
55
import './index.css';
66

77
ReactDOM.createRoot(document.getElementById('root')!).render(
88
<React.StrictMode>
9-
<BrowserRouter>
9+
<MemoryRouter initialEntries={['/']} initialIndex={0}>
1010
<App />
11-
</BrowserRouter>
11+
</MemoryRouter>
1212
</React.StrictMode>,
1313
);

0 commit comments

Comments
 (0)