Fix: permission icon not updating in component config handle

This commit is contained in:
devanshu052000 2025-06-26 00:18:37 +05:30
parent 412f5ad837
commit ba5f51888d

View file

@ -1996,8 +1996,8 @@ export const createComponentsSlice = (set, get) => ({
});
},
setComponentPermission: (componentId, data) => {
const { currentPageId, modules } = get();
const currentPageIndex = modules.canvas.pages.findIndex((page) => page.id === currentPageId);
const { modules } = get();
const currentPageIndex = modules.canvas.currentPageIndex;
const component = modules.canvas.pages[currentPageIndex]?.components?.[componentId];
if (component) {