Skip to content

Commit a0263bf

Browse files
committed
more UI polishes
1 parent daa383b commit a0263bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/todos.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function Todos({ todos }: { todos: Todo[] }) {
8686
todos.map((todo) => (
8787
<li
8888
key={todo.id}
89-
className="flex items-center gap-2 w-full hover:bg-muted/50 active:bg-muted rounded-sm p-1"
89+
className="h-10 flex items-center gap-2 w-full hover:bg-muted/50 active:bg-muted rounded-sm p-1"
9090
>
9191
<Checkbox
9292
checked={
@@ -96,7 +96,9 @@ export function Todos({ todos }: { todos: Todo[] }) {
9696
}
9797
onCheckedChange={() => handleToggle(todo.id)}
9898
id={`checkbox-${todo.id}`}
99-
disabled={deleted.findIndex((t) => t === todo.id) > -1}
99+
disabled={
100+
deleted.findIndex((t) => t === todo.id) > -1 || loading
101+
}
100102
/>
101103
<label
102104
htmlFor={`checkbox-${todo.id}`}
@@ -116,6 +118,7 @@ export function Todos({ todos }: { todos: Todo[] }) {
116118
size="sm"
117119
variant="destructive"
118120
className="p-3"
121+
disabled={loading}
119122
onClick={() => markForDeletion(todo.id)}
120123
>
121124
<Trash size={16} />

0 commit comments

Comments
 (0)