fix: router in electron

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-07-19 23:23:53 +08:00
parent befe9e88e1
commit ddb96b9e27
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ function Login() {
const urlParams = new URLSearchParams(location.search)
const provider = urlParams.get("provider")
useEffect(() => {
if (!ELECTRON && provider) {
if (!window.electron && provider) {
if (status === "authenticated") {
signOut()
}
+1 -1
View File
@@ -9,7 +9,7 @@ import { buildGlobRoutes } from "./lib/route-builder"
const globTree = import.meta.glob("./pages/**/*.tsx")
const tree = buildGlobRoutes(globTree)
let routerCreator = ELECTRON ? createHashRouter : createBrowserRouter
let routerCreator = window.electron ? createHashRouter : createBrowserRouter
if (window.SENTRY_RELEASE) {
routerCreator = wrapCreateBrowserRouter(routerCreator)
}