We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8a3707 commit c88d560Copy full SHA for c88d560
src/components/PinnedTodoList.tsx
@@ -27,7 +27,16 @@ export const PinnedTodoList: React.FC<PinnedTodoListProps> = ({ workspaceId }) =
27
() => workspaceStore.getWorkspaceState(workspaceId).todos
28
);
29
30
- if (todos.length === 0) {
+ // Get streaming state
31
+ const canInterrupt = useSyncExternalStore(
32
+ (callback) => workspaceStore.subscribeKey(workspaceId, callback),
33
+ () => workspaceStore.getWorkspaceState(workspaceId).canInterrupt
34
+ );
35
+
36
+ // Filter completed todos while streaming
37
+ const displayTodos = canInterrupt ? todos.filter((todo) => todo.status !== "completed") : todos;
38
39
+ if (displayTodos.length === 0) {
40
return null;
41
}
42
0 commit comments