From 16c857542b9d543db0aa46cd892b22acd8943a08 Mon Sep 17 00:00:00 2001 From: Simon Rho Date: Tue, 1 Oct 2024 12:15:06 -0400 Subject: [PATCH] Fix the login message display issue --- jccm/src/Frontend/Components/Login.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jccm/src/Frontend/Components/Login.js b/jccm/src/Frontend/Components/Login.js index 51f446f..5c97fb2 100644 --- a/jccm/src/Frontend/Components/Login.js +++ b/jccm/src/Frontend/Components/Login.js @@ -246,8 +246,8 @@ export const Login = ({ isOpen, onClose }) => { console.log('Two Factor Auth required!'); return { status: 'two_factor' }; } else { - console.log('Login successful!'); - await eventBus.emit('cloud-inventory-refresh'); + // console.log('Login successful!'); + // await eventBus.emit('cloud-inventory-refresh'); return { status: 'success', @@ -294,6 +294,10 @@ export const Login = ({ isOpen, onClose }) => { Constants.getActiveThemeName(data?.user?.theme) ); + setTimeout(async () => { + await eventBus.emit('cloud-inventory-refresh'); + }, 1000); + onClose(); } else if (response.status === 'two_factor') { console.log('Two Factor Auth required!');