Skip to content

Commit

Permalink
removed timeout on connection error and popup
Browse files Browse the repository at this point in the history
  • Loading branch information
jhuang38 committed Aug 6, 2023
1 parent 3dd181d commit f1cd8ba
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions dashboard/src/components/DashboardLayout/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ export default function DashboardLayout() {

// open the error modal is coreConnectionStatus is error for more than 3 seconds
useEffect(() => {
if (coreConnectionStatus === 'error') {
const timeout = setTimeout(() => {
setShowCoreErrorModal(true);
}, 3000);
return () => clearTimeout(timeout);
} else {
setShowCoreErrorModal(false);
}
setShowCoreErrorModal(coreConnectionStatus === 'error')
}, [coreConnectionStatus]);

const versionMismatchModal = !coreInfoLoading && (
Expand Down Expand Up @@ -163,11 +156,11 @@ export default function DashboardLayout() {
title="Core Connection Error"
type="info"
z-index="20"
confirmButtonText="Change Core"
confirmButtonText="Back to Core selection"
onConfirm={() => {
setPathname('/login/core/select');
}}
closeButtonText="Refresh"
closeButtonText="Continue with current Core"
onClose={() => {
window.location.reload();
}}
Expand Down

0 comments on commit f1cd8ba

Please sign in to comment.