Skip to content

Commit

Permalink
fix: warnings show only on mounted component
Browse files Browse the repository at this point in the history
  • Loading branch information
mickol34 committed Oct 15, 2024
1 parent 3102196 commit 99a9b1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mqueryfront/src/status/StatusPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class StatusPage extends Component {
.catch((error) => {
this.setState({ error: error });
});
this._ismounted = true;
}

getAgentsUrsaURLDuplicatesWarning(agentgroups) {
Expand Down Expand Up @@ -60,7 +61,7 @@ class StatusPage extends Component {
return (
<ErrorBoundary error={this.state.error}>
<div className="container-fluid">
{ursaURLWarning && (
{this._ismounted && ursaURLWarning && (
<WarningPage msg={ursaURLWarning} dismissable />
)}
<h1 className="text-center mq-bottom">Status</h1>
Expand All @@ -69,7 +70,7 @@ class StatusPage extends Component {
<VersionStatus
components={this.state.backend.components}
/>
{noAgentsWarning ? (
{this._ismounted && noAgentsWarning ? (
<WarningPage msg={noAgentsWarning} />
) : (
<BackendStatus
Expand Down

0 comments on commit 99a9b1e

Please sign in to comment.