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


##########
superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx:
##########
@@ -71,13 +71,17 @@ export default function AddDataset() {
   >(datasetReducer, null);
 
   const HeaderComponent = () => (
-    <Header setDataset={setDataset} datasetName={dataset?.dataset_name ?? ''} 
/>
+    <Header
+      setDataset={setDataset}
+      title={dataset?.table_name ?? 'New dataset'}
+      schema={dataset?.schema ?? ''}
+    />
   );
 
   const LeftPanelComponent = () => (
     <LeftPanel
       setDataset={setDataset}
-      schema={dataset?.schema}
+      schema={dataset?.schema ?? ''}

Review Comment:
   Since `schema` is optional as per the definition in `LeftPanelProps` 
wouldn't be sufficient to just send `dataset?.schema` ? without the empty 
string.



##########
superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/DatasetLayout.test.tsx:
##########
@@ -36,18 +36,12 @@ describe('DatasetLayout', () => {
   const mockSetDataset = jest.fn();
 
   const waitForRender = () =>
-    waitFor(() =>
-      render(<Header setDataset={mockSetDataset} datasetName="" />),
-    );
+    waitFor(() => render(<Header setDataset={mockSetDataset} title="" />));

Review Comment:
   Isn't this the same as having no title thus the `title: string;` should be 
optional? Or what implication would that have? 🤔 



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