You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/12/01 01:06:20 UTC

[GitHub] [superset] Damans227 commented on a change in pull request #17603: chore: migrate EstimateQueryCostButton component from jsx to tsx

Damans227 commented on a change in pull request #17603:
URL: https://github.com/apache/superset/pull/17603#discussion_r759778169



##########
File path: superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx
##########
@@ -26,24 +25,28 @@ import Loading from 'src/components/Loading';
 import ModalTrigger from 'src/components/ModalTrigger';
 import { EmptyWrapperType } from 'src/components/TableView/TableView';
 
-const propTypes = {
-  dbId: PropTypes.number.isRequired,
-  schema: PropTypes.string.isRequired,
-  sql: PropTypes.string.isRequired,
-  getEstimate: PropTypes.func.isRequired,
-  queryCostEstimate: PropTypes.Object,
-  selectedText: PropTypes.string,
-  tooltip: PropTypes.string,
-  disabled: PropTypes.bool,
-};
-const defaultProps = {
-  queryCostEstimate: [],
-  tooltip: '',
-  disabled: false,
-};
+interface EstimateQueryCostButtonProps {
+  dbId: number;
+  schema: string;
+  sql: string;
+  getEstimate: Function;
+  queryCostEstimate: Record<string, any>;
+  selectedText?: string;
+  tooltip?: string;
+  disabled: boolean;

Review comment:
       Done. 

##########
File path: superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx
##########
@@ -54,20 +57,20 @@ const EstimateQueryCostButton = props => {
   );
 
   const onClick = () => {

Review comment:
       Done. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org