diff --git a/webapp/src/components/viewHeader.tsx b/webapp/src/components/viewHeader.tsx index e3294e45e..b1a0e53be 100644 --- a/webapp/src/components/viewHeader.tsx +++ b/webapp/src/components/viewHeader.tsx @@ -69,16 +69,16 @@ class ViewHeader extends React.Component { } } - onExportCsvTrigger(boardTree: BoardTree, intl: IntlShape) { + onExportCsvTrigger(boardTree: BoardTree) { try { CsvExporter.exportTableCsv(boardTree) - const exportCompleteMessage = intl.formatMessage({ + const exportCompleteMessage = this.props.intl.formatMessage({ id: 'ViewHeader.export-complete', defaultMessage: 'Export complete!', }) sendFlashMessage({content: exportCompleteMessage, severity: 'normal'}) } catch (e) { - const exportFailedMessage = intl.formatMessage({ + const exportFailedMessage = this.props.intl.formatMessage({ id: 'ViewHeader.export-failed', defaultMessage: 'Export failed!', }) @@ -315,7 +315,7 @@ class ViewHeader extends React.Component { this.onExportCsvTrigger(boardTree, intl)} + onClick={() => this.onExportCsvTrigger(boardTree)} /> {/*