Antonio-RiveroMartnez commented on code in PR #21241:
URL: https://github.com/apache/superset/pull/21241#discussion_r966379941


##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx:
##########
@@ -17,7 +17,65 @@
  * 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 withToasts from 'src/components/MessageToasts/withToasts';
+import { DatasetObject } from '../types';
 
-export default function Footer() {
-  return <div>Footer</div>;
+interface FooterObject {
+  url: string;
+  addDangerToast: () => void;
+  datasetObject?: Partial<DatasetObject> | null;
+  onDatasetAdd?: (dataset: DatasetObject) => void;
 }
+
+function Footer({ url, datasetObject, addDangerToast }: FooterObject) {

Review Comment:
   I just realize we have two `Footer` components:
   
`superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx`
   `superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx`
   
   Isn't weird to have two components called`<Footer>`  with different 
`FooterProps` in the same codebase? Should we consider a rename for one of them?



##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx:
##########
@@ -20,10 +20,47 @@ import React from 'react';
 import { render, screen } from 'spec/helpers/testing-library';
 import Footer from 'src/views/CRUD/data/dataset/AddDataset/Footer';
 
+const mockedProps = {
+  url: 'realwebsite.com',
+};
+
+const mockPropsWithDataset = {
+  url: 'realwebsite.com',
+  datasetObject: {
+    database: {
+      id: '1',
+      database_name: 'examples',
+    },
+    owners: [1, 2, 3],
+    schema: 'public',
+    dataset_name: 'Untitled',
+    table_name: 'real_info',
+  },
+};
+
 describe('Footer', () => {
-  it('renders a blank state Footer', () => {
-    render(<Footer />);

Review Comment:
   It seems like we were rendering this component before without required 
props, and now, url and addDangerToast are required. Question, are there any 
other call to this component from before that was not updated to send the new 
props?



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