diff --git a/frontend/src/components/Pages/Signup.jsx b/frontend/src/components/Pages/Signup.jsx
index 1fdd97e7..0d8e47b6 100644
--- a/frontend/src/components/Pages/Signup.jsx
+++ b/frontend/src/components/Pages/Signup.jsx
@@ -1,6 +1,7 @@
-import { useState } from 'react';
-import photo from '../../assets/login.png';
-import { useNavigate } from 'react-router-dom';
+
+import { useState , useEffect } from "react";
+import photo from "../../assets/login.png";
+import { useNavigate } from "react-router-dom";
const Signup = () => {
const API_URL = import.meta.env.VITE_BACKEND_URL || 'http://localhost:3000';
@@ -70,6 +71,10 @@ const Signup = () => {
}
};
+ useEffect(() => {
+ window.scrollTo(0, 0);
+ }, []);
+
return (
diff --git a/frontend/src/components/Pages/TodaysSpecial.jsx b/frontend/src/components/Pages/TodaysSpecial.jsx
index 0d15c297..5b911ffc 100644
--- a/frontend/src/components/Pages/TodaysSpecial.jsx
+++ b/frontend/src/components/Pages/TodaysSpecial.jsx
@@ -11,64 +11,27 @@ import caesar_salad from '../../assets/TSimg/caesar_salad.webp';
const menuItems = {
coffee: [
- {
- name: 'Espresso',
- description: 'Rich and bold coffee shot.',
- image: espresso,
- },
- {
- name: 'Cappuccino',
- description: 'Creamy coffee with frothy milk.',
- image: cappuccino,
- },
- {
- name: 'Latte',
- description: 'Smooth coffee with steamed milk.',
- image: latte,
- },
+ { name: "Espresso", description: "Rich and bold coffee shot.", image: espresso, originalPrice: "$3.00", offerPrice: "$2.50" },
+ { name: "Cappuccino", description: "Creamy coffee with frothy milk.", image: cappuccino, originalPrice: "$3.50", offerPrice: "$3.00" },
+ { name: "Latte", description: "Smooth coffee with steamed milk.", image: latte, originalPrice: "$4.00", offerPrice: "$3.50" },
],
drinks: [
- {
- name: 'Mango Smoothie',
- description: 'Refreshing mango blend.',
- image: mango_smoothie,
- },
- {
- name: 'Lemonade',
- description: 'Zesty and chilled lemonade.',
- image: lemonade,
- },
- {
- name: 'Iced Tea',
- description: 'Cool iced tea with lemon.',
- image: iced_tea,
- },
+ { name: "Mango Smoothie", description: "Refreshing mango blend.", image: mango_smoothie, originalPrice: "$4.50", offerPrice: "$4.00" },
+ { name: "Lemonade", description: "Zesty and chilled lemonade.", image: lemonade, originalPrice: "$2.50", offerPrice: "$2.00" },
+ { name: "Iced Tea", description: "Cool iced tea with lemon.", image: iced_tea, originalPrice: "$2.00", offerPrice: "$1.50" },
],
food: [
- {
- name: 'Cheese Sandwich',
- description: 'Toasted sandwich with cheese.',
- image: cheese_sandwich,
- },
- {
- name: 'Pasta Primavera',
- description: 'Veggies and pasta in a light sauce.',
- image: pasta_primavera,
- },
- {
- name: 'Caesar Salad',
- description: 'Crispy salad with Caesar dressing.',
- image: caesar_salad,
- },
+ { name: "Cheese Sandwich", description: "Toasted sandwich with cheese.", image: cheese_sandwich, originalPrice: "$3.50", offerPrice: "$3.00" },
+ { name: "Pasta Primavera", description: "Veggies and pasta in a light sauce.", image: pasta_primavera, originalPrice: "$5.50", offerPrice: "$5.00" },
+ { name: "Caesar Salad", description: "Crispy salad with Caesar dressing.", image: caesar_salad, originalPrice: "$5.00", offerPrice: "$4.50" },
+
],
};
const TodaysSpecial = () => {
- const [todaysSpecial, setTodaysSpecial] = useState({
- coffee: {},
- drink: {},
- food: {},
- });
+
+ const [todaysSpecial, setTodaysSpecial] = useState({ coffee: {}, drink: {}, food: {} });
+ const [hoveredItem, setHoveredItem] = useState(null); // State to track the hovered item
// Function to update today's special (cycling through 3 items)
const updateTodaysSpecial = () => {
@@ -91,32 +54,64 @@ const TodaysSpecial = () => {
Today's Special
-
-
+ {/* Coffee Card */}
+
setHoveredItem('coffee')}
+ onMouseLeave={() => setHoveredItem(null)}
+ >
+
+
{todaysSpecial.coffee.name}
{todaysSpecial.coffee.description}
+ {/* Show prices below the image and description */}
+ {hoveredItem === 'coffee' && (
+
+
{todaysSpecial.coffee.originalPrice}
+
{todaysSpecial.coffee.offerPrice}
+
+ )}
-
-
+
+ {/* Food Card */}
+
setHoveredItem('food')}
+ onMouseLeave={() => setHoveredItem(null)}
+ >
+
+
{todaysSpecial.food.name}
{todaysSpecial.food.description}
+ {/* Show prices below the image and description */}
+ {hoveredItem === 'food' && (
+
+
{todaysSpecial.food.originalPrice}
+
{todaysSpecial.food.offerPrice}
+
+ )}
-
-
+
+ {/* Drink Card */}
+
setHoveredItem('drink')}
+ onMouseLeave={() => setHoveredItem(null)}
+ >
+
+
{todaysSpecial.drink.name}
{todaysSpecial.drink.description}
+ {/* Show prices below the image and description */}
+ {hoveredItem === 'drink' && (
+
+
{todaysSpecial.drink.originalPrice}
+
{todaysSpecial.drink.offerPrice}
+
+ )}