lyndsiWilliams commented on code in PR #21241:
URL: https://github.com/apache/superset/pull/21241#discussion_r957886544


##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx:
##########
@@ -17,7 +17,53 @@
  * under the License.
  */
 import React from 'react';
+import Button from 'src/components/Button';
+import { t } from '@superset-ui/core';
+import { useSingleViewResource } from 'src/views/CRUD/hooks';
+import { addDangerToast } from 'src/components/MessageToasts/actions';
+import { DatasetObject } from '../types';
 
-export default function Footer() {
-  return <div>Footer</div>;
+interface FooterObject {
+  url: string;
+  datasetObject?: Partial<DatasetObject> | null;
+}
+
+export default function Footer({ url, datasetObject }: FooterObject) {
+  const { createResource } = useSingleViewResource<Partial<DatasetObject>>(
+    'dataset',
+    t('dataset'),
+    addDangerToast,
+  );
+  const cancelButtonOnClick = () => {
+    // this is a placeholder url until the final feature gets implemented
+    // at that point we will be passing in the url of the previous location.
+    window.location.href = url;
+  };
+
+  const tooltipText = t('Select a database table.');
+
+  const onSave = () => {
+    if (datasetObject) {
+      createResource(datasetObject).then(response => {
+        if (!response) {
+          return;
+        }

Review Comment:
   Looks like the return in this if statement is failing FE tests. What is the 
case for this, where there is no response?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to