From 5e3b37288d96277a6eacb7d6464760b63f72874a Mon Sep 17 00:00:00 2001 From: Biswa Kalyan Bhuyan Date: Wed, 28 May 2025 19:44:26 +0530 Subject: feat: improved UI and added dynamic theme toggle - improved the nav bar components - added the theme toggle button to toggle theme - fixed the button background for the nav bar - fixed the theme color issue to the ThemeToggle funtion - added more vibrant colors - fixed the theme logo render --- frontend/src/components/footer.tsx | 96 ++++++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 24 deletions(-) (limited to 'frontend/src/components/footer.tsx') diff --git a/frontend/src/components/footer.tsx b/frontend/src/components/footer.tsx index d7c8ae7..d64167f 100644 --- a/frontend/src/components/footer.tsx +++ b/frontend/src/components/footer.tsx @@ -1,24 +1,38 @@ +"use client"; + +import { useEffect } from "react"; import Link from "next/link"; import Image from "next/image"; -import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; -import { Separator } from "@/components/ui/separator"; +import { Input } from "@/components/ui/input"; import { Facebook, Instagram, Twitter, Youtube, - Mail, Phone, + Mail, MapPin, - CreditCard, - Shield, Truck, RefreshCw, + Shield, + CreditCard, } from "lucide-react"; export function Footer() { - const currentYear = new Date().getFullYear(); + // Preload both logo variants + useEffect(() => { + const preloadLogos = () => { + if (typeof window !== 'undefined') { + const lightLogo = new window.Image(); + const darkLogo = new window.Image(); + lightLogo.src = '/black-logo.png'; + darkLogo.src = '/white-logo.png'; + } + }; + + preloadLogos(); + }, []); const footerLinks = { shop: [ @@ -53,25 +67,25 @@ export function Footer() { }; return ( -