From 847bf9be129d30efde9de13df56c64c4a60dfa77 Mon Sep 17 00:00:00 2001 From: Eniola3321 Date: Fri, 27 Mar 2026 19:52:04 +0100 Subject: [PATCH] feat[Frontend]: Implement Featured This Week Image Cards --- frontend/src/app/page.tsx | 2 + .../component/Homepage/FeaturedThisWeek.tsx | 157 ++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 frontend/src/component/Homepage/FeaturedThisWeek.tsx diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 7365463f..2c111a3c 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -4,6 +4,7 @@ import Head from "next/head"; import Header from "@/component/Header"; import Footer from "@/component/Footer"; import HeroSection from "@/component/Homepage/HeroSection"; +import FeaturedThisWeek from "@/component/Homepage/FeaturedThisWeek"; import HowItWorksSection from "@/component/Homepage/HowItWorksSection"; @@ -70,6 +71,7 @@ export default function Home() {
+ diff --git a/frontend/src/component/Homepage/FeaturedThisWeek.tsx b/frontend/src/component/Homepage/FeaturedThisWeek.tsx new file mode 100644 index 00000000..330bc2d1 --- /dev/null +++ b/frontend/src/component/Homepage/FeaturedThisWeek.tsx @@ -0,0 +1,157 @@ +"use client"; + +import React from "react"; +import { motion } from "framer-motion"; +import { Users, Trophy, Clock } from "lucide-react"; +import Image from "next/image"; + +interface FeaturedCardProps { + image: string; + tag: string; + title: string; + description: string; + stats: { + users: string; + volume: string; + time: string; + }; + tagColor?: "purple" | "blue"; +} + +const FeaturedCard: React.FC = ({ + image, + tag, + title, + description, + stats, + tagColor = "purple", +}) => { + const tagClass = + tagColor === "purple" + ? "bg-purple-600/90 text-white" + : "bg-blue-600/90 text-white"; + + return ( + + {/* Top Image & Tag */} +
+ {title} +
+ {tag} +
+
+ + {/* Card Content */} +
+

+ {title} +

+

+ {description} +

+ + {/* Stats Row */} +
+
+ + {stats.users} +
+
+ + {stats.volume} +
+
+ + {stats.time} +
+
+ + {/* Action Button */} + +
+
+ ); +}; + +export default function FeaturedThisWeek() { + const featuredEvents = [ + { + image: "https://images.unsplash.com/photo-1611974708434-996e1393607a?auto=format&fit=crop&q=80&w=800", + tag: "Trading Competition", + title: "Elite Traders Championship", + description: "Compete with the best traders globally and win a share of the massive prize pool in this high-stakes competition.", + stats: { users: "24k", volume: "$80,000", time: "12:00h" }, + tagColor: "purple" as const, + }, + { + image: "https://images.unsplash.com/photo-1639762681485-074b7f938ba0?auto=format&fit=crop&q=80&w=800", + tag: "Live Analysis", + title: "Market Insights Summit", + description: "Join top analysts for real-time market breakdown and discover hidden gems in the current crypto landscape.", + stats: { users: "15k", volume: "$45,000", time: "08:00h" }, + tagColor: "blue" as const, + }, + { + image: "https://images.unsplash.com/photo-1633158829585-23ba8f7c8caf?auto=format&fit=crop&q=80&w=800", + tag: "DeFi Strategies", + title: "Advanced DeFi Strategies", + description: "Learn and implement complex yield farming and liquidity provision strategies to maximize your returns safely.", + stats: { users: "18k", volume: "$120,000", time: "24:00h" }, + tagColor: "purple" as const, + }, + ]; + + return ( +
+
+ {/* Section Header */} +
+ +

+ Featured This Week + +

+
+
+ + {/* 3-Column Grid */} +
+ {featuredEvents.map((event, index) => ( + + + + ))} +
+
+ + {/* Background Decorative Element */} +
+
+
+
+
+ ); +}