[Page Layouts] - Add tabs (#14318)

This commit is contained in:
nitin
2025-09-06 14:57:37 +05:30
committed by GitHub
parent 821ae7c60d
commit ab9b5ca4c5
39 changed files with 1545 additions and 307 deletions
@@ -0,0 +1,24 @@
import { type TabLayouts } from '../states/pageLayoutCurrentLayoutsState';
export const removeWidgetLayoutFromTab = (
allTabLayouts: TabLayouts,
tabId: string,
widgetId: string,
): TabLayouts => {
if (!allTabLayouts[tabId]) {
return allTabLayouts;
}
const currentTabLayouts = allTabLayouts[tabId];
return {
...allTabLayouts,
[tabId]: {
desktop: currentTabLayouts.desktop.filter(
(layout) => layout.i !== widgetId,
),
mobile: currentTabLayouts.mobile.filter(
(layout) => layout.i !== widgetId,
),
},
};
};