mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-11-02 19:57:58 +00:00
Make resetting the store synchronous
This commit is contained in:
@@ -27,9 +27,11 @@ const Login = () => {
|
|||||||
const handleLogin = (email, password) => {
|
const handleLogin = (email, password) => {
|
||||||
authenticateUser({ variables: { email, password } })
|
authenticateUser({ variables: { email, password } })
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
client.cache.reset();
|
client.resetStore()
|
||||||
updateToken(data.authenticateUser);
|
.then(() => {
|
||||||
history.push('/');
|
updateToken(data.authenticateUser);
|
||||||
|
history.push('/');
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(() =>
|
.catch(() =>
|
||||||
notification.error({
|
notification.error({
|
||||||
|
|||||||
Reference in New Issue
Block a user