Skip to content

feat: add cart page - #4

Merged
Abviol merged 15 commits into
devfrom
feat/cart-page
Apr 13, 2026
Merged

feat: add cart page#4
Abviol merged 15 commits into
devfrom
feat/cart-page

Conversation

@Abviol

@Abviol Abviol commented Apr 13, 2026

Copy link
Copy Markdown
Owner
  • create the cart page
    • main <CartPage> server component, which fetches data and passes it to a child client component
    • the child <CartPageClient> client component displays the list of cart items and total price. Interactive
  • refactor <cartItem>:
    • handle delete and quantity change to the parent components
    • prop names
  • add mock data and mock API endpoint
  • <header>: set actual cart page URL to the cart icon

Abviol added 15 commits April 13, 2026 16:05
Remove logic outside the component. It must receive, display, and emit eventual changes.
- Move the handling delete, quantity change to the parent components. <CartItems> only displays and emit eventual changes.
- add onQuantityChange event
- rename prop title -> name
- add CART_ITEMS data array to lib/data.ts
- create a mock cartItems API endpoint
- page.tsx is a server wrapper. Gets data and passes it to the <CartPageClient> client component
- the <CartPageClient> component displays the list of cart items and the total price.
emit a newValue instead of a delta
- handle newValue instead of delta
- (cartPageClient): set correct dependencies
- (lib/data): remove unused import
@Abviol Abviol added the enhancement New feature or request label Apr 13, 2026
@vercel

vercel Bot commented Apr 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scent Ready Ready Preview, Comment Apr 13, 2026 2:50pm

@Abviol
Abviol merged commit 849408e into dev Apr 13, 2026
3 checks passed
@Abviol
Abviol deleted the feat/cart-page branch April 14, 2026 18:35
@Abviol Abviol changed the title feat/cart-page feat: add cart page May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant