Update widgets and added settings

This commit is contained in:
2026-07-10 14:56:11 -07:00
parent c69ac2ba42
commit df8bcd376e
6 changed files with 105 additions and 13 deletions
+11
View File
@@ -43,6 +43,17 @@ export const useDashboardStore = create((set, get) => ({
}
},
updateWidgetSettings: (id, newSettings) => set((state) => {
console.log("2. Zustand updating widget:", id, "with:", newSettings);
return {
widgets: state.widgets.map(widget =>
widget.id === id
? { ...widget, settings: { ...widget.settings, ...newSettings } }
: widget
)
};
}),
addWidget: (widgetId, sizeKey) => {
const registryEntry = WIDGET_REGISTRY[widgetId];