From 3bcbd4e99223ff43b83875ff734c4c460712f118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Delattre?= Date: Thu, 18 Jul 2019 12:52:10 +0200 Subject: [PATCH] Fix alert after the user is logged If the user enters the wrong password the first time and then login, he will be prompted with an error. This commit fixes this behaviour. --- frontend/js/actions/users.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/js/actions/users.js b/frontend/js/actions/users.js index 625af61..bce02b6 100644 --- a/frontend/js/actions/users.js +++ b/frontend/js/actions/users.js @@ -1,6 +1,6 @@ import { configureAxios, request } from "../requests" -import { addAlertOk } from "./alerts" +import { addAlertOk, dismissAlert } from "./alerts" import { getManagedPolochons } from "./polochon" @@ -20,6 +20,9 @@ export function loginUser(username, password) { password: password, }, ), + [ + () => dismissAlert(), + ] ) }