How to use window.location.href in Electron?

Viewed 114

I have a react app which I've converted to Electron app also. In the app after I logout I'm redirecting the user back to login screen using

window.location.href="/login"

it is working perfectly in React build. But in Electron build it is not redirecting to the login route rather the app crashes. In the network tab there is an API call made to C:///login in Windows. So I am confused on how to use the same in React and Electron without breaking UI.

0 Answers
Related