Skip to content

Commit

Permalink
🐛 hide editing errors while grapher is loading
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Feb 14, 2025
1 parent 4647c12 commit ad3f9fe
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions adminSiteClient/SaveButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,12 @@ class SaveButtonsForChart extends Component<{
(this.narrativeChartNameModalOpen = "closed")
}
/>
{editingErrors.map((error, i) => (
<div key={i} className="alert alert-danger mt-2">
{error}
</div>
))}
{grapher.isReady &&
editingErrors.map((error, i) => (
<div key={i} className="alert alert-danger mt-2">
{error}
</div>
))}
</div>
)
}
Expand Down Expand Up @@ -206,11 +207,12 @@ class SaveButtonsForIndicatorChart extends Component<{
? "Create indicator chart"
: "Update indicator chart"}
</button>
{editingErrors.map((error, i) => (
<div key={i} className="alert alert-danger mt-2">
{error}
</div>
))}
{grapher.isReady &&
editingErrors.map((error, i) => (
<div key={i} className="alert alert-danger mt-2">
{error}
</div>
))}
</div>
)
}
Expand Down Expand Up @@ -268,11 +270,12 @@ class SaveButtonsForChartView extends Component<{
>
Create DI
</button>
{editingErrors.map((error, i) => (
<div key={i} className="alert alert-danger mt-2">
{error}
</div>
))}
{grapher.isReady &&
editingErrors.map((error, i) => (
<div key={i} className="alert alert-danger mt-2">
{error}
</div>
))}
{this.isCreateDataInsightModalOpen && (
<CreateDataInsightModal
description="Create a new data insight based on this narrative chart."
Expand Down

0 comments on commit ad3f9fe

Please sign in to comment.