Browse Source

fix: Login

master
Muthu Kumar 4 years ago
parent
commit
b6cd0f7228
Signed by untrusted user: mkrhere GPG Key ID: 3FD688398897097E
  1. 2
      react/src/App.js
  2. 3
      react/src/pages/Login.js

2
react/src/App.js

@ -10,7 +10,7 @@ function App() {
<Router>
<Login path="/" />
<Search path="/search" />
<Movie path="/movie" />
<Movie path="/movie/:movieId" />
</Router>
);
}

3
react/src/pages/Login.js

@ -136,8 +136,7 @@ function LoginForm({ showRegister }) {
const data = await response.json();
window.localStorage.setItem("Token", data.token);
alert("Successfully logged in with the token " + data.token);
// TODO:
window.location = "/search";
} catch (e) {
setError(e.message);
}

Loading…
Cancel
Save