Compare commits

...

1 Commits

Author SHA1 Message Date
Elizabeth Thompson
727bcb8a8a refactor: remove unnecessary themedConfirm wrapper function
The themedConfirm function was a pass-through wrapper that added no value:
- It simply called AntdModal.confirm(props) with the same props
- The comment claimed it was "theme-aware" but it provided no theming logic
- Theming is already handled automatically through the Ant Design App
  wrapper in SupersetThemeProvider

This appears to be legacy code from an older theming implementation or
prepared infrastructure that was never actually utilized.

Replaced with direct reference to AntdModal.confirm for clarity and
to remove unnecessary abstraction layer.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 18:36:04 -07:00

View File

@@ -368,13 +368,9 @@ const CustomModal = ({
};
CustomModal.displayName = 'Modal';
// Theme-aware confirmation modal - now inherits theme through App wrapper in SupersetThemeProvider
const themedConfirm = (props: Parameters<typeof AntdModal.confirm>[0]) =>
AntdModal.confirm(props);
export const Modal = Object.assign(CustomModal, {
error: AntdModal.error,
warning: AntdModal.warning,
confirm: themedConfirm,
confirm: AntdModal.confirm,
useModal: AntdModal.useModal,
});