Merge branch 'add/persistant-widget-state' into 'main'

Clean garbage comments from refactor

See merge request vkuchenik/website-framework!28
This commit is contained in:
Dan Hansen
2025-07-25 20:26:27 +00:00
2 changed files with 0 additions and 23 deletions
@@ -11,11 +11,6 @@ import { useState, useEffect } from "react";
export function DashboardCanvas({ layout, setLayout, onLayoutChange }) { export function DashboardCanvas({ layout, setLayout, onLayoutChange }) {
const [isEditable, setIsEditable] = useState(false); // editable=true means static=false (vice versa) const [isEditable, setIsEditable] = useState(false); // editable=true means static=false (vice versa)
const [newCounter, setNewCounter] = useState(3); const [newCounter, setNewCounter] = useState(3);
// const [layout, setLayout] = useState([
// { i: '0', x: 0, y: 0, w: 3, h: 3, minH: 3, minW: 1, static: !isEditable },
// { i: '1', x: 3, y: 0, w: 3, h: 3, minH: 3, minW: 1, static: !isEditable },
// { i: '2', x: 6, y: 0, w: 3, h: 3, minH: 3, minW: 1, static: !isEditable }
// ]);
const [originalLayout, setOriginalLayout] = useState([]); const [originalLayout, setOriginalLayout] = useState([]);
useEffect(() => { useEffect(() => {
@@ -68,11 +63,6 @@ export function DashboardCanvas({ layout, setLayout, onLayoutChange }) {
setLayout(prev => prev.filter(w => w.i !== id)); setLayout(prev => prev.filter(w => w.i !== id));
} }
// const onLayoutChange = (newLayout) => {
// setLayout(newLayout);
// console.log('Updated layout:', newLayout)
// };
return ( return (
/* HEADER */ /* HEADER */
<Tabs.Root lazyMount defaultValue="my dashboard"> <Tabs.Root lazyMount defaultValue="my dashboard">
@@ -105,14 +95,6 @@ export function DashboardCanvas({ layout, setLayout, onLayoutChange }) {
</Tabs.Trigger> </Tabs.Trigger>
</Tabs.List> </Tabs.List>
{/* <HStack >
<SearchBar />
<SettingsButton visible={isEditable}
onAddWidget={ onAddWidget }
onEditWidgets={ onEditWidgets }
onDeleteWidgets={ onDeleteWidgets }
/>
</HStack> */}
<HStack > <HStack >
{isEditable ? ( {isEditable ? (
<> <>
@@ -17,11 +17,6 @@ export default function Dashboard() {
{ i: '2', x: 6, y: 0, w: 3, h: 3, minH: 3, minW: 1, static: true } { i: '2', x: 6, y: 0, w: 3, h: 3, minH: 3, minW: 1, static: true }
]); ]);
const onLayoutChange = (newLayout) => {
setLayout(newLayout);
console.log('Updated layout:', newLayout)
};
return ( return (
<> <>
<Global // change the background color of widget shadow when moving <Global // change the background color of widget shadow when moving