From c810056d67a0d46b3983c4c2159be0357cbd9e54 Mon Sep 17 00:00:00 2001 From: Christopher Hight Date: Mon, 19 Oct 2026 14:34:40 -0700 Subject: [PATCH] Refactor dashboard to use new theme.js --- client/src/pages/home/tabs/MyDashboard.jsx | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/client/src/pages/home/tabs/MyDashboard.jsx b/client/src/pages/home/tabs/MyDashboard.jsx index 3dc9f98..3836ecf 100644 --- a/client/src/pages/home/tabs/MyDashboard.jsx +++ b/client/src/pages/home/tabs/MyDashboard.jsx @@ -29,13 +29,14 @@ export default function MyDashboard() { const hasHydrated = useRef(false); // 1. Pull the global slot recipes - const glassPanelRecipe = useSlotRecipe({key: "glassPanel"}); - const glassPanelStyles = glassPanelRecipe(); - const widgetStyles = glassPanelRecipe({ layout: "widget" }); - const widgetSettingsRecipe = useSlotRecipe({ key: "widgetSettings" }); - const widgetSettingsStyles = widgetSettingsRecipe(); + const widgetRecipe = useSlotRecipe({ key: "widget" }); + const popoverRecipe = useSlotRecipe({ key: "glassPopover" }); - // 2. Populate widgets + // 2. Pass the editing state directly into the widget recipe! + const widgetStyles = widgetRecipe({ mode: isEditing ? "editing" : undefined }); + const popoverStyles = popoverRecipe(); + + // 3. Populate widgets useEffect(() => { if (user?.preferences?.dashboard_layout && !hasHydrated.current) { const savedLayout = user.preferences.dashboard_layout; @@ -57,7 +58,7 @@ export default function MyDashboard() { isResizable: false // The magic lock! No resizing allowed globally. })); - // 3. The component mapper + // 4. The component mapper const renderWidget = (widget) => { const registryEntry = WIDGET_REGISTRY[widget.type]; @@ -84,8 +85,8 @@ export default function MyDashboard() { {/* NEW: The Positioner lifts the content out of the Flexbox flow */} - - {/*className={`${glassPanelStyles.root} ${widgetSettingsStyles.root}`}>*/} + + }> {/* THE DELETE BUTTON */}