Skip to content

Commit

Permalink
continued refactoring (#16377)
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi committed Oct 28, 2021
1 parent 97a0071 commit 5e8bd9d
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export default function HeaderReportActionsDropDown({
>(state => state.user || state.explore?.user);
const reportsIds = Object.keys(reports || []);
const report: AlertObject = reports?.[reportsIds[0]];
console.log(report);
const [
currentReportDeleting,
setCurrentReportDeleting,
Expand Down Expand Up @@ -103,6 +102,19 @@ export default function HeaderReportActionsDropDown({
}
}, []);

useEffect(() => {
if (canAddReports()) {
dispatch(
fetchUISpecificReport({
userId: user.userId,
filterField: 'dashboard_id',
creationMethod: 'dashboards',
resourceId: dashboardId,
}),
);
}
}, [dashboardId]);

const menu = () => (
<Menu selectable={false} css={{ width: '200px' }}>
<Menu.Item>
Expand Down

0 comments on commit 5e8bd9d

Please sign in to comment.