Skip to content

Commit c4d3a20

Browse files
committed
chore: manual review minor improvements
1 parent cc0872c commit c4d3a20

2 files changed

Lines changed: 17 additions & 22 deletions

File tree

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
# Cursor AI - Todo App with Atlas UI
1+
---
2+
alwaysApply: true
3+
---
4+
25

36
For comprehensive documentation about the project structure, architecture, and development practices, please refer to the [AI.md](/AI.md) file.

src/components/TodoList/TodoItem.tsx

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import React from 'react';
2-
import {
3-
ListItem,
4-
ListItemText,
5-
ListItemSecondaryAction,
6-
IconButton,
7-
Checkbox,
8-
Divider,
9-
Typography,
10-
} from '@mui/material';
2+
import { ListItem, ListItemText, IconButton, Checkbox, Divider, Typography } from '@mui/material';
113
import type { Todo } from '../../types/Todo';
124
import { useTodo } from '../../hooks/useTodo';
135

@@ -32,6 +24,18 @@ export const TodoItem: React.FC<TodoItemProps> = ({ todo, onEditClick }) => {
3224
},
3325
}}
3426
onClick={() => onEditClick(todo)}
27+
secondaryAction={
28+
<IconButton
29+
edge="end"
30+
aria-label="delete"
31+
onClick={e => {
32+
e.stopPropagation();
33+
deleteTodo(todo.id);
34+
}}
35+
>
36+
Delete
37+
</IconButton>
38+
}
3539
>
3640
<Checkbox
3741
edge="start"
@@ -69,18 +73,6 @@ export const TodoItem: React.FC<TodoItemProps> = ({ todo, onEditClick }) => {
6973
</Typography>
7074
}
7175
/>
72-
<ListItemSecondaryAction>
73-
<IconButton
74-
edge="end"
75-
aria-label="delete"
76-
onClick={e => {
77-
e.stopPropagation();
78-
deleteTodo(todo.id);
79-
}}
80-
>
81-
Delete
82-
</IconButton>
83-
</ListItemSecondaryAction>
8476
</ListItem>
8577
<Divider />
8678
</>

0 commit comments

Comments
 (0)