coryhouse / coryhouse/react-restaurant-scriptpro

Add 'Add to Cart' button on FoodCard with Sonner toast

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
enhancement phase-5-cart
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Goal
Add an "Add to cart" button to `FoodCard`. On click, add the item to the cart and show a Sonner toast confirming.

## Acceptance criteria
- [ ] `sonner` installed and `` mounted at the root
- [ ] Clicking the button calls `addItem`
- [ ] Toast shows "Added to cart"
- [ ] Clicking the button does not navigate to the detail page (stop propagation)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.