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