chore: fix build issue
This commit is contained in:
+29
-27
@@ -12,37 +12,39 @@ interface Props {
|
||||
handleEdit(task: ITask): void;
|
||||
}
|
||||
|
||||
const TaskList = ({ taskList, handleDelete, handleEdit }: Props) => {
|
||||
const TaskList = ({ taskList, handleDelete, handleEdit }: Props): JSX.Element => {
|
||||
if (taskList.length) {
|
||||
return (
|
||||
taskList.map((task) => (
|
||||
<div key={task.id} className={styles.task}>
|
||||
<div className={styles.details}>
|
||||
<h4>{task.title}</h4>
|
||||
<p>
|
||||
Difficulty:
|
||||
{task.difficulty}
|
||||
</p>
|
||||
</div>
|
||||
<>
|
||||
{taskList.map((task) => (
|
||||
<div key={task.id} className={styles.task}>
|
||||
<div className={styles.details}>
|
||||
<h4>{task.title}</h4>
|
||||
<p>
|
||||
Difficulty:
|
||||
{task.difficulty}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.actions}>
|
||||
<button
|
||||
type="button"
|
||||
className="bi bi-pencil"
|
||||
onClick={() => { handleEdit(task); }}
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="bi bi-trash"
|
||||
onClick={() => { handleDelete(task.id); }}
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
<div className={styles.actions}>
|
||||
<button
|
||||
type="button"
|
||||
className="bi bi-pencil"
|
||||
onClick={() => { handleEdit(task); }}
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="bi bi-trash"
|
||||
onClick={() => { handleDelete(task.id); }}
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user