M-ayank2005 / Foodie

Welcome to foodie
https://foodie-nine-red.vercel.app
6 stars 13 forks source link

Issue 42 - Added Menu Categorization Feature #43

Closed TanishqAswar closed 3 weeks ago

TanishqAswar commented 3 weeks ago

Pull Request: Menu Categorization Feature

Summary

This pull request introduces a menu categorization feature to the Menu component. With this enhancement, users can filter menu items based on categories like Pizza, Salads, Pasta, and Desserts.

Changes Implemented

  1. Category Buttons: Added buttons at the top of the menu section for category selection.
  2. Filtering Logic: Implemented a function that filters menu items based on the selected category.
  3. Dynamic Display: Updated the menu item rendering logic to only show items matching the chosen category.

Screenshot

Screenshot 2024-10-31 160006

Closes #42

Code Implementation

1. Menu Items with Categories

Each menu item now has a category attribute:


const menuItems = [
  { name: 'Margherita Pizza', price: 'Rs12.99', description: 'Classic pizza with tomato sauce, mozzarella, and basil.', image: 'https://images.unsplash.com/photo-1598023696416-0193a0bcd302?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8TWFyZ2hlcml0YSUyMFBpenphfGVufDB8fDB8fHww', category: 'Pizza' },
  { name: 'Caesar Salad', price: 'Rs9.99', description: 'Romaine lettuce, Caesar dressing, and croutons.', image: 'https://images.unsplash.com/photo-1551024601-bec78aea704b', category: 'Salads' },
  // ... other menu items with corresponding categories
];
vercel[bot] commented 3 weeks ago

@TanishqAswar is attempting to deploy a commit to the m-ayank2005's projects Team on Vercel.

A member of the Team first needs to authorize it.

netlify[bot] commented 3 weeks ago

Deploy Preview for mayank-foodie failed. Why did it fail? →

Name Link
Latest commit 42eaf028bd646f2059be7ca5b429d5583e07bf91
Latest deploy log https://app.netlify.com/sites/mayank-foodie/deploys/67235c9e1828770008dc1be4
TanishqAswar commented 3 weeks ago

Hi @M-ayank2005 please assign this issue to me.

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
foodie ❌ Failed (Inspect) Oct 31, 2024 3:57pm