diff --git a/src/app/recipes/page.tsx b/src/app/recipes/page.tsx index 14ec0f9..9db7588 100644 --- a/src/app/recipes/page.tsx +++ b/src/app/recipes/page.tsx @@ -1,164 +1,99 @@ "use client"; -import { useState, useEffect } from "react"; +import { useState } from "react"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered'; +import HeroSplitKpi from '@/components/sections/hero/HeroSplitKpi'; +import FeatureCardTwentyFive from '@/components/sections/feature/FeatureCardTwentyFive'; +import ProductCardOne from '@/components/sections/product/ProductCardOne'; import FooterBase from '@/components/sections/footer/FooterBase'; -import { Filter, ChefHat, Flame, Zap, Clock, Users } from 'lucide-react'; +import { Apple, Filter, Flame, Zap, TrendingDown, TrendingUp, Users, Mail } from 'lucide-react'; -interface Recipe { - id: string; - name: string; - goal: 'weight-loss' | 'muscle-gain'; - calories: number; - protein: number; - carbs: number; - fat: number; - prepTime: number; - difficulty: 'easy' | 'medium' | 'hard'; - ingredients: string[]; - instructions: string[]; - imageUrl?: string; -} - -const recipeDatabase: Recipe[] = [ +// Recipe Database +const recipeDatabase = [ { - id: '1', - name: 'Peito de Frango Grelhado com Brócolis', - goal: 'muscle-gain', - calories: 450, + id: "1", name: "Grilled Chicken Breast with Quinoa", category: "Protein", calories: 450, protein: 45, carbs: 35, - fat: 12, - prepTime: 25, - difficulty: 'easy', - ingredients: ['Peito de frango 200g', 'Brócolis 200g', 'Azeite 1 colher', 'Sal e pimenta'], - instructions: ['Tempere o frango', 'Grelhe em fogo alto 8 minutos cada lado', 'Cozinhe o brócolis no vapor', 'Sirva quente'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' + fats: 12, + prepTime: "25 min", goals: ["muscle-gain"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "Grilled Chicken with Quinoa" }, { - id: '2', - name: 'Salada Verde com Proteína', - goal: 'weight-loss', - calories: 280, - protein: 30, - carbs: 15, - fat: 8, - prepTime: 15, - difficulty: 'easy', - ingredients: ['Alface 200g', 'Peito de frango 150g', 'Cenoura 50g', 'Limão 1', 'Azeite 1 colher'], - instructions: ['Lave as folhas de alface', 'Corte a cenoura em palitos', 'Desfihe o frango cozido', 'Misture e tempere com limão e azeite'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' + id: "2", name: "Veggie Stir-Fry with Tofu", category: "Vegetarian", calories: 280, + protein: 18, + carbs: 42, + fats: 8, + prepTime: "20 min", goals: ["weight-loss"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "Veggie Stir-Fry" }, { - id: '3', - name: 'Omelete de Claras com Vegetais', - goal: 'weight-loss', - calories: 200, - protein: 25, - carbs: 10, - fat: 5, - prepTime: 10, - difficulty: 'easy', - ingredients: ['Claras de ovo 5', 'Espinafre 100g', 'Tomate 100g', 'Sal e pimenta'], - instructions: ['Bata as claras com sal', 'Aqueça a frigideira com spray', 'Coloque os vegetais', 'Despeje as claras e cozinhe até firmar'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' + id: "3", name: "Salmon with Sweet Potato", category: "Fish", calories: 520, + protein: 38, + carbs: 48, + fats: 18, + prepTime: "30 min", goals: ["muscle-gain"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "Salmon with Sweet Potato" }, { - id: '4', - name: 'Arroz Integral com Frango e Feijão', - goal: 'muscle-gain', - calories: 580, - protein: 40, - carbs: 65, - fat: 10, - prepTime: 40, - difficulty: 'medium', - ingredients: ['Arroz integral 1 xícara cozido', 'Frango 200g', 'Feijão 100g', 'Cebola e alho'], - instructions: ['Cozinhe o arroz integral', 'Refogue cebola e alho', 'Adicione o frango cortado', 'Misture com o feijão', 'Finalize com o arroz'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' + id: "4", name: "Egg White Omelet with Veggies", category: "Breakfast", calories: 180, + protein: 22, + carbs: 12, + fats: 4, + prepTime: "15 min", goals: ["weight-loss", "muscle-gain"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "Egg White Omelet" }, { - id: '5', - name: 'Salmão ao Forno com Abóbora', - goal: 'muscle-gain', - calories: 520, - protein: 42, - carbs: 40, - fat: 15, - prepTime: 35, - difficulty: 'medium', - ingredients: ['Salmão 200g', 'Abóbora 300g', 'Alecrim', 'Azeite', 'Limão'], - instructions: ['Tempere o salmão com limão', 'Corte a abóbora em cubos', 'Coloque em assadeira', 'Asse a 200°C por 25 minutos'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' - }, - { - id: '6', - name: 'Batida de Proteína com Frutas', - goal: 'muscle-gain', - calories: 350, + id: "5", name: "Turkey Meatballs with Zucchini Noodles", category: "Protein", calories: 320, protein: 35, - carbs: 40, - fat: 3, - prepTime: 5, - difficulty: 'easy', - ingredients: ['Whey protein 30g', 'Banana 1', 'Maçã 1', 'Leite desnatado 200ml'], - instructions: ['Bata tudo no liquidificador', 'Sirva imediatamente'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' - }, - { - id: '7', - name: 'Sopa de Legumes com Caldo de Galinha', - goal: 'weight-loss', - calories: 150, - protein: 15, carbs: 18, - fat: 2, - prepTime: 30, - difficulty: 'easy', - ingredients: ['Caldo de galinha 500ml', 'Cenoura 100g', 'Abobrinha 100g', 'Brócolis 100g', 'Sal'], - instructions: ['Aqueça o caldo', 'Corte os legumes em pequenos cubos', 'Cozinhe até ficarem macios', 'Tempere e sirva'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' + fats: 10, + prepTime: "28 min", goals: ["weight-loss"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "Turkey Meatballs" }, { - id: '8', - name: 'Iogurte Grego com Granola', - goal: 'muscle-gain', - calories: 320, - protein: 28, - carbs: 35, - fat: 8, - prepTime: 2, - difficulty: 'easy', - ingredients: ['Iogurte grego 200g', 'Granola 50g', 'Mel 1 colher', 'Morango fresco'], - instructions: ['Coloque o iogurte na tigela', 'Adicione a granola', 'Regue com mel', 'Complete com morangos'], - imageUrl: 'https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png' + id: "6", name: "Lean Beef with Brown Rice", category: "Protein", calories: 580, + protein: 42, + carbs: 58, + fats: 14, + prepTime: "35 min", goals: ["muscle-gain"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "Lean Beef with Rice" + }, + { + id: "7", name: "Green Salad with Grilled Chicken", category: "Salad", calories: 280, + protein: 32, + carbs: 22, + fats: 6, + prepTime: "18 min", goals: ["weight-loss"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "Green Salad" + }, + { + id: "8", name: "High-Protein Pasta with Lean Ground Meat", category: "Pasta", calories: 480, + protein: 40, + carbs: 52, + fats: 8, + prepTime: "25 min", goals: ["muscle-gain"], + imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AoRNSPr0mCBj85JKsHl7qxTHsl/nutrition-dashboard-showing-meal-plans-d-1773256981349-9348b6d9.png", imageAlt: "High-Protein Pasta" } ]; export default function RecipesPage() { - const [selectedGoal, setSelectedGoal] = useState<'weight-loss' | 'muscle-gain' | null>(null); - const [userGoal, setUserGoal] = useState<'weight-loss' | 'muscle-gain' | null>(null); - const [isLoggedIn, setIsLoggedIn] = useState(false); + const [selectedGoal, setSelectedGoal] = useState<"all" | "weight-loss" | "muscle-gain">("all"); - useEffect(() => { - // Simulate checking login status from localStorage or auth context - const storedGoal = localStorage.getItem('userFitnessGoal'); - const loggedIn = localStorage.getItem('isLoggedIn') === 'true'; - - if (storedGoal) { - setUserGoal(storedGoal as 'weight-loss' | 'muscle-gain'); - } - setIsLoggedIn(loggedIn); - }, []); + // Filter recipes based on selected goal + const filteredRecipes = selectedGoal === "all" + ? recipeDatabase + : recipeDatabase.filter(recipe => recipe.goals.includes(selectedGoal)); - const filteredRecipes = selectedGoal || userGoal - ? recipeDatabase.filter(recipe => recipe.goal === (selectedGoal || userGoal)) - : recipeDatabase; - - const handleGoalChange = (goal: 'weight-loss' | 'muscle-gain' | null) => { - setSelectedGoal(goal); - }; + // Convert filtered recipes to product format for ProductCardOne + const recipeProducts = filteredRecipes.map(recipe => ({ + id: recipe.id, + name: recipe.name, + price: `${recipe.calories} cal | ${recipe.protein}g protein`, + imageSrc: recipe.imageSrc, + imageAlt: recipe.imageAlt, + onProductClick: () => console.log(`Selected recipe: ${recipe.name}`) + })); return ( -
-
- {/* Header */} -
-

- - Receituário Personalizado -

-

- {isLoggedIn && userGoal - ? `Suas receitas estão personalizadas para ${userGoal === 'weight-loss' ? 'perda de peso' : 'ganho de massa'}` - : 'Filtre receitas por seu objetivo de fitness'} -

-
+
+ +
- {/* Filter Section */} -
-
- -

Filtrar por Objetivo

-
-
- - - -
-
+
+ +
- {/* Recipes Grid */} -
- {filteredRecipes.map((recipe) => ( -
- {/* Image */} - {recipe.imageUrl && ( -
+
+
+
+ {/* Filter Buttons */} +
+
+

Receitas Recomendadas

+

Selecione seu objetivo para ver receitas personalizadas

+
+
+ + + +
+
+ + {/* Recipe Grid */} +
+ {filteredRecipes.map(recipe => ( +
+
{recipe.name}
- )} +
+
+

{recipe.name}

+ + {recipe.category} + +
+

Tempo: {recipe.prepTime}

+ + {/* Macros */} +
+
+

Calorias

+

{recipe.calories}

+
+
+

Proteína

+

{recipe.protein}g

+
+
+

Carbs

+

{recipe.carbs}g

+
+
+

Gordura

+

{recipe.fats}g

+
+
- {/* Content */} -
-

{recipe.name}

- - {/* Macros */} -
-
-
{recipe.calories}
-
kcal
-
-
-
{recipe.protein}g
-
Proteína
-
-
-
{recipe.carbs}g
-
Carbs
-
-
-
{recipe.fat}g
-
Gordura
-
-
- - {/* Info */} -
-
- - {recipe.prepTime}min -
-
- - {recipe.difficulty === 'easy' ? 'Fácil' : recipe.difficulty === 'medium' ? 'Médio' : 'Difícil'} -
-
- - {/* Ingredients Summary */} -
-

Ingredientes:

-
    - {recipe.ingredients.slice(0, 3).map((ingredient, idx) => ( -
  • - - {ingredient} -
  • - ))} - {recipe.ingredients.length > 3 && ( -
  • +{recipe.ingredients.length - 3} mais
  • + {/* Goal Tags */} +
    + {recipe.goals.includes("weight-loss") && ( + Perda )} -
+ {recipe.goals.includes("muscle-gain") && ( + Ganho + )} +
+ +
- - {/* Button */} -
-
- ))} -
- - {filteredRecipes.length === 0 && ( -
- -

Nenhuma receita encontrada para este filtro.

+ ))}
- )} + + {filteredRecipes.length === 0 && ( +
+

Nenhuma receita encontrada para este objetivo.

+
+ )} +
@@ -337,7 +296,7 @@ export default function RecipesPage() { columns={[ { title: "Produto", items: [ - { label: "Dashboard", href: "/" }, + { label: "Dashboard", href: "dashboard" }, { label: "Treino", href: "training" }, { label: "Receitas", href: "/recipes" }, { label: "Cardio Hub", href: "cardio" }