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 2020/12/09 23:45:40 UTC

[GitHub] [incubator-superset] eschutho commented on a change in pull request #11936: chore: consolidate common code in importers

eschutho commented on a change in pull request #11936:
URL: https://github.com/apache/incubator-superset/pull/11936#discussion_r539733506



##########
File path: superset-frontend/src/components/ImportModal/index.tsx
##########
@@ -68,11 +145,11 @@ const ImportChartModal: FunctionComponent<ImportChartModalProps> = ({
   const {
     state: { passwordsNeeded },
     importResource,
-  } = useImportResource<ChartObject>('chart', t('chart'), handleErrorMsg);
+  } = useImportResource<any>(resourceName, resourceLabel, handleErrorMsg);

Review comment:
       do you want to constrain this with a set of type arguments for each type of model? You can do the same for the resourceName.. not a blocker, though, just if you want to make the types stronger




----------------------------------------------------------------
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.

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