diff --git a/superset-frontend/src/components/ReportModal/HeaderReportActionsDropdown/index.tsx b/superset-frontend/src/components/ReportModal/HeaderReportActionsDropdown/index.tsx index 88c90429103dd..45a3fde058cfc 100644 --- a/superset-frontend/src/components/ReportModal/HeaderReportActionsDropdown/index.tsx +++ b/superset-frontend/src/components/ReportModal/HeaderReportActionsDropdown/index.tsx @@ -28,8 +28,8 @@ import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; import DeleteModal from 'src/components/DeleteModal'; import ReportModal from 'src/components/ReportModal'; import { ChartState } from 'src/explore/types'; -import { fetchUISpecificReport } from 'src/reports/actions/reports'; import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes'; +import { fetchUISpecificReport } from 'src/reports/actions/reports'; const deleteColor = (theme: SupersetTheme) => css` color: ${theme.colors.error.base}; diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx b/superset-frontend/src/dashboard/components/Header/index.jsx index 3d9eaf8f2eb71..64f353d70359c 100644 --- a/superset-frontend/src/dashboard/components/Header/index.jsx +++ b/superset-frontend/src/dashboard/components/Header/index.jsx @@ -165,17 +165,6 @@ class Header extends React.PureComponent { componentDidMount() { const { refreshFrequency } = this.props; this.startPeriodicRender(refreshFrequency * 1000); - if (this.canAddReports()) { - // this is in case there is an anonymous user. - if (Object.entries(dashboardInfo).length) { - this.props.fetchUISpecificReport( - user.userId, - 'dashboard_id', - 'dashboards', - dashboardInfo.id, - ); - } - } } componentDidUpdate(prevProps) { diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx index 685b693a2efc1..f77a41ba09060 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx @@ -22,7 +22,6 @@ import { bindActionCreators } from 'redux'; import PropTypes from 'prop-types'; import Icons from 'src/components/Icons'; import { Tooltip } from 'src/components/Tooltip'; -import ReportModal from 'src/components/ReportModal'; import { CategoricalColorNamespace, SupersetClient, @@ -30,7 +29,11 @@ import { t, } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; -import { toggleActive, deleteActiveReport } from 'src/reports/actions/reports'; +import { + fetchUISpecificReport, + toggleActive, + deleteActiveReport, +} from 'src/reports/actions/reports'; import HeaderReportActionsDropdown from 'src/components/ReportModal/HeaderReportActionsDropdown'; import { chartPropShape } from 'src/dashboard/util/propShapes'; import EditableTitle from 'src/components/EditableTitle';