Skip to content

Commit 1daa7f6

Browse files
committed
Fix runtime error in production
1 parent 12b7242 commit 1daa7f6

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

package-lock.json

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"sonner": "^2.0.7",
6363
"tailwind-merge": "^3.3.1",
6464
"tw-animate-css": "^1.3.7",
65+
"zod": "^4.0.17",
6566
"zustand": "^5.0.8"
6667
},
6768
"devDependencies": {

src/renderer/src/App.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useEffect, useState } from 'react'
2-
import { BrowserRouter, Routes, Route } from 'react-router'
2+
import { HashRouter, Routes, Route } from 'react-router'
33
import { Toaster } from 'sonner'
44
import CoderPage from '@/coder'
55
import SettingsPage from '@/settings'
@@ -29,6 +29,7 @@ export default function App() {
2929
)
3030
setInitialized(true)
3131
})
32+
// eslint-disable-next-line react-hooks/exhaustive-deps
3233
}, [])
3334

3435
useEffect(() => {
@@ -39,17 +40,18 @@ export default function App() {
3940

4041
useEffect(() => {
4142
window.api.initShortcuts(shortcuts)
43+
// eslint-disable-next-line react-hooks/exhaustive-deps
4244
}, [])
4345

4446
return (
4547
<>
46-
<BrowserRouter>
48+
<HashRouter>
4749
<Routes>
4850
<Route index element={<CoderPage />} />
4951
<Route path="settings" element={<SettingsPage />} />
5052
<Route path="help" element={<HelpPage />} />
5153
</Routes>
52-
</BrowserRouter>
54+
</HashRouter>
5355

5456
<Toaster />
5557
</>

0 commit comments

Comments
 (0)