bito-code-review[bot] commented on code in PR #40912:
URL: https://github.com/apache/superset/pull/40912#discussion_r3431899582
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx:
##########
@@ -425,6 +427,16 @@ const StyledTableTabWrapper = styled.div`
}
`;
+// Functional wrapper for the lineage tab, since hooks can't be used directly
in
+// the DatasourceEditor class component.
+function DatasetLineageTab({ datasourceId }: { datasourceId?: number }) {
+ const lineageResource = useDatasetLineage(datasourceId ?? 0);
Review Comment:
<!-- Bito Reply -->
The change to use an empty string as the fallback is appropriate. This
ensures the `isEmptyId` helper correctly identifies the value as empty,
preventing the unnecessary API call that was previously triggered by the `0`
fallback.
**superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx**
```
function DatasetLineageTab({ datasourceId }: { datasourceId?: number }) {
const lineageResource = useDatasetLineage(datasourceId ?? '');
```
--
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]