Repository navigation
Feature/recommend #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
76027e3
feat: enhance meal recommendation system and update profile handling
NorhanElyann 776cbd9
chore: remove unnecessary blank line in SuggestedMeals component
NorhanElyann b987bbe
feat: implement suggested meals teaser for unauthenticated users and …
NorhanElyann 588771a
Merge branch 'dev' of https://github.com/Revive-Graduation-Project/Re…
NorhanElyann 82f4123
fix: update import paths for RegularFoodCard component to lowercase
NorhanElyann f7d8cf6
feat: enhance suggested meals teaser and improve profile join date fo…
NorhanElyann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| import { Link } from "react-router-dom"; | ||
| import RegularFoodCard from "../../../components/ui/RegularFoodCard"; | ||
|
|
||
| const PLACEHOLDER_MEALS = [ | ||
| { | ||
| id: 1, | ||
| name: "Mystery Meal", | ||
| price: 12.99, | ||
| hasDiscount: false, | ||
| discountPercentage: 0, | ||
| nutrients: [], | ||
| imageUrl: null, | ||
| }, | ||
| { | ||
| id: 2, | ||
| name: "Mystery Meal", | ||
| price: 9.99, | ||
| hasDiscount: false, | ||
| discountPercentage: 0, | ||
| nutrients: [], | ||
| imageUrl: null, | ||
| }, | ||
| { | ||
| id: 3, | ||
| name: "Mystery Meal", | ||
| price: 15.99, | ||
| hasDiscount: false, | ||
| discountPercentage: 0, | ||
| nutrients: [], | ||
| imageUrl: null, | ||
| }, | ||
| { | ||
| id: 4, | ||
| name: "Mystery Meal", | ||
| price: 11.99, | ||
| hasDiscount: false, | ||
| discountPercentage: 0, | ||
| nutrients: [], | ||
| imageUrl: null, | ||
| }, | ||
| ]; | ||
|
|
||
| const SuggestedMealsTeaser = () => { | ||
| return ( | ||
| <section className="py-8 md:py-12"> | ||
| <div className="container mx-auto px-4"> | ||
| <div className="flex items-center gap-3 mb-6"> | ||
| <h2 className="text-2xl md:text-3xl font-bold text-gray-800"> | ||
| Suggested For You | ||
| </h2> | ||
| <span className="text-3xl">✨</span> | ||
| </div> | ||
|
|
||
| <div className="relative"> | ||
| {/* Cards with light blur */} | ||
| <div className="grid grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-2 md:gap-8 blur-[2px] pointer-events-none select-none opacity-60"> | ||
| {PLACEHOLDER_MEALS.map((meal) => ( | ||
| <RegularFoodCard key={meal.id} meal={meal} /> | ||
| ))} | ||
| </div> | ||
|
|
||
| {/* Overlay */} | ||
| <div className="absolute inset-0 flex flex-col items-center justify-center bg-white/40 rounded-2xl"> | ||
| {/* Lock Icon */} | ||
| <div className="w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center mb-4 shadow-sm"> | ||
| <svg | ||
| className="w-8 h-8 text-green-600" | ||
| fill="none" | ||
| stroke="currentColor" | ||
| strokeWidth={2} | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" | ||
| /> | ||
| </svg> | ||
| </div> | ||
|
|
||
| <h3 className="text-xl md:text-2xl font-bold text-gray-800 mb-2 text-center"> | ||
| Meals tailored just for you! | ||
| </h3> | ||
| <p className="text-gray-500 text-sm md:text-base mb-6 text-center px-4"> | ||
| Sign in to get AI-powered meal recommendations based on your | ||
| health goals | ||
| </p> | ||
| <div className="flex gap-3"> | ||
| <Link | ||
| to="/auth/login" | ||
| className="bg-orange-500 hover:bg-orange-600 text-white px-6 py-2.5 rounded-full text-sm font-semibold transition" | ||
| > | ||
| Sign In | ||
| </Link> | ||
| <Link | ||
| to="/auth/signup" | ||
| className="border border-orange-500 text-orange-500 hover:bg-orange-50 px-6 py-2.5 rounded-full text-sm font-semibold transition" | ||
| > | ||
| Create Account | ||
| </Link> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| ); | ||
| }; | ||
|
|
||
| export default SuggestedMealsTeaser; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Decorative blurred cards remain keyboard/screen-reader focusable.
pointer-events-noneprevents mouse clicks but not keyboard tab focus or screen-reader traversal. Keyboard users can still tab into the placeholder cards' heart/add-to-cart buttons, which do nothing meaningful and aren't visually indicated as focused behind the blur/overlay.♿ Suggested fix
🤖 Prompt for AI Agents