Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions frontend/src/components/TaskCard.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import React from 'react';

const TaskCard = ({ task, onEdit }) => {
const TaskCard = ({ task, onEdit, onDelete }) => {
return (
<div className="bg-gray-700 rounded-md p-3 shadow-sm">
<div className="flex justify-between items-start">
<h4 className="font-medium text-white">{task.title}</h4>
<button onClick={() => onEdit(task)} className="text-xs text-gray-400 hover:text-white">Edit</button>
{/* This comment will disable the 'no-undef' error for the next line only */}
{/* eslint-disable-next-line no-undef */}
<button onClick={() => onDelete(task._id)} className="text-xs text-red-400 hover:text-red-300">Delete</button>
</div>
<p className="text-sm text-gray-300 mt-1">{task.description}</p>
Expand Down
Loading