refactor: migrate ExploreResultsButton component to FC & tsx (#18143)

* Move ExploreResultsButton to FC & tsx

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Refactoring

* Fix test
This commit is contained in:
EugeneTorap
2022-02-08 18:57:08 +03:00
committed by GitHub
parent fa8c81e1b1
commit cdfcbbaf30
4 changed files with 61 additions and 329 deletions

View File

@@ -527,13 +527,9 @@ export default class ResultSet extends React.PureComponent<
/>
<ResultSetButtons>
{this.props.visualize &&
this.props.database &&
this.props.database.allows_virtual_table_explore && (
this.props.database?.allows_virtual_table_explore && (
<ExploreResultsButton
// @ts-ignore Redux types are difficult to work with, ignoring for now
query={this.props.query}
database={this.props.database}
actions={this.props.actions}
onClick={this.handleExploreBtnClick}
/>
)}