Skip to content

Commit

Permalink
fix(sources-modal): fix broken dismiss button
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Oct 19, 2023
1 parent c0e421c commit cec115e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/@ourworldindata/grapher/src/modal/SourcesModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,14 @@ export class SourcesModal extends React.Component<{
return `${this.props.manager.adminBaseUrl}/admin/datasets`
}

@action private onDismiss(): void {
this.manager.isSourcesModalOpen = false
}

render(): JSX.Element {
const columns = this.manager.columnsWithSources
return (
<Modal
title="Sources"
onDismiss={this.onDismiss}
onDismiss={action(
() => (this.manager.isSourcesModalOpen = false)
)}
bounds={this.modalBounds}
>
<div className="SourcesModalContent">
Expand Down

0 comments on commit cec115e

Please sign in to comment.