SophiaLinetti / capstone-project_budget-buddy

https://capstone-project-budget-buddy.vercel.app
2 stars 0 forks source link

#2 Entry Delete Button #3

Open nadine-grantz opened 7 months ago

nadine-grantz commented 7 months ago

Value proposition

As a User I want to be able to delete my specific entries so that i can update the List of income/expenses

Description

Bildschirmfoto 2024-02-02 um 10 08 20

Acceptance criteria

Tasks

function DeleteButton({ id }) {
  const handleDelete = () => {
    const newTransactions = transactions.filter((transaction) => transaction.id !== id);
    setTransactions(newTransactions);
  };

  return (
    <button onClick={handleDelete}>Delete</button>
  );
}
StellaKakarali commented 7 months ago

Looks great!