mistercrunch commented on code in PR #31860:
URL: https://github.com/apache/superset/pull/31860#discussion_r1924320102
##########
superset-frontend/src/features/datasets/AddDataset/LeftPanel/index.tsx:
##########
@@ -178,13 +178,30 @@ export default function LeftPanel({
),
[datasetNames],
);
+ const getDatabaseEmptyState = (emptyResultsWithSearch: boolean) => (
+ <EmptyState
+ image="empty.svg"
+ title={
+ emptyResultsWithSearch
+ ? t('No databases match your search')
+ : t('No databases available')
+ }
+ description={
+ <span>
+ {t('Manage your databases')}{' '}
+ <a href="/databaseview/list">{t('here')}</a>
+ </span>
+ }
+ size="small"
+ />
+ );
return (
<LeftPanelStyle>
<TableSelector
database={dataset?.db}
handleError={addDangerToast}
- emptyState={emptyStateComponent(false)}
+ emptyState={getDatabaseEmptyState(false)}
Review Comment:
Here I simply moved and renamed the function to a better name/location,
didn't want to alter the logic.
--
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]