Skip to content

Commit ec5f970

Browse files
committed
Address review comments
1 parent 1bd2ac7 commit ec5f970

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/tasks/src/components/TasksPanel.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ interface TasksPanelProps {
3232
};
3333
}
3434

35-
export function TasksPanel({ tasks, templates, persisted }: TasksPanelProps) {
35+
export function TasksPanel({
36+
tasks,
37+
templates,
38+
persisted: { initialCreateExpanded, initialHistoryExpanded, save },
39+
}: TasksPanelProps) {
3640
const { selectedTask, isLoadingDetails, selectTask, deselectTask } =
3741
useSelectedTask(tasks);
3842

3943
const [createRef, createOpen, setCreateOpen] =
40-
useCollapsibleToggle<CollapsibleElement>(persisted.initialCreateExpanded);
44+
useCollapsibleToggle<CollapsibleElement>(initialCreateExpanded);
4145
const [historyRef, historyOpen] = useCollapsibleToggle<CollapsibleElement>(
42-
persisted.initialHistoryExpanded,
46+
initialHistoryExpanded,
4347
);
4448

4549
const createScrollRef = useRef<ScrollableElement>(null);
@@ -53,13 +57,13 @@ export function TasksPanel({ tasks, templates, persisted }: TasksPanelProps) {
5357
}, [onShowCreateForm, setCreateOpen]);
5458

5559
useEffect(() => {
56-
persisted.save({
60+
save({
5761
tasks,
5862
templates,
5963
createExpanded: createOpen,
6064
historyExpanded: historyOpen,
6165
});
62-
}, [persisted, tasks, templates, createOpen, historyOpen]);
66+
}, [save, tasks, templates, createOpen, historyOpen]);
6367

6468
function renderHistory() {
6569
if (selectedTask) {

0 commit comments

Comments
 (0)