Skip to content
Snippets Groups Projects
Unverified Commit ae608f0c authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:bug: (dashboards) add back spending report if dashboards feature is not enabled (#3323)

parent f1c0d0b8
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,26 @@ export function Overview() {
const isDashboardsFeatureEnabled = useFeatureFlag('dashboards');
const spendingReportFeatureFlag = useFeatureFlag('spendingReport');
const layout = useWidgetLayout(widgets);
const baseLayout = useWidgetLayout(widgets);
const layout =
spendingReportFeatureFlag &&
!isDashboardsFeatureEnabled &&
!baseLayout.find(({ type }) => type === 'spending-card')
? [
...baseLayout,
{
i: 'spending',
type: 'spending-card' as const,
x: 0,
y: Math.max(...baseLayout.map(({ y }) => y), 0) + 2,
w: 4,
h: 2,
minW: 3,
minH: 2,
meta: null,
},
]
: baseLayout;
const closeNotifications = () => {
dispatch(removeNotification('import'));
......
---
category: Bugfix
authors: [MatissJanis]
---
Dashboards: add back spending report if dashboards are not enabled
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment