fnardin-maystreet commented on code in PR #32995:
URL: https://github.com/apache/superset/pull/32995#discussion_r2030830250
##########
superset-frontend/src/pages/ChartList/index.tsx:
##########
@@ -478,16 +482,25 @@ function ChartList(props: ChartListProps) {
{confirmDelete => (
<Tooltip
id="delete-action-tooltip"
- title={t('Delete')}
+ title={
+ allowEdit
+ ? t('Delete')
+ : t(
+ 'You must be a chart owner in order to delete.
Please reach out to a chart owner to request modifications or edit access.',
+ )
+ }
placement="bottom"
>
<span
role="button"
tabIndex={0}
className="action-button"
- onClick={confirmDelete}
+ onClick={allowEdit ? confirmDelete : undefined}
Review Comment:
the type is actually `onClick?: MouseEventHandler<T> | undefined;`
--
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]