diff --git a/apps/web/app/gig-details/page.tsx b/apps/web/app/gig-details/page.tsx index 6f8c669..c3e6f48 100644 --- a/apps/web/app/gig-details/page.tsx +++ b/apps/web/app/gig-details/page.tsx @@ -217,68 +217,98 @@ function GigDetailsContent() { {/* Content Wrapper */}
{/* Header & Mobile Action */} -
- -
- {avatar ? ( - <> - {influencer?.fullName { - const target = e.target as HTMLImageElement; - target.style.display = 'none'; - const fallback = target.nextElementSibling as HTMLElement; - if (fallback) fallback.style.display = 'block'; - }} - /> - {(influencer?.fullName || "I").charAt(0).toUpperCase()} - - ) : ( - (influencer?.fullName || "I").charAt(0).toUpperCase() - )} -
-
-
-

{influencer?.fullName || "Unknown Creator"}

- {influencer?.isVerified && ( - - - Verified - +
+ +
+ {avatar ? ( + <> + {influencer?.fullName { + const target = e.target as HTMLImageElement; + target.style.display = 'none'; + const fallback = target.nextElementSibling as HTMLElement; + if (fallback) fallback.style.display = 'block'; + }} + /> + {(influencer?.fullName || "I").charAt(0).toUpperCase()} + + ) : ( + (influencer?.fullName || "I").charAt(0).toUpperCase() )}
-
- {influencer.categories.join(" & ")} - - - - New - +
+
+

{influencer?.fullName?.split(' ')[0] || "Creator"}

+ {influencer?.isVerified && ( + + )} +
+

Profile

+ + +
+
- +
- {/* Mobile/Tablet Request Button */} -
- +
+ {avatar ? ( + {influencer?.fullName + ) : ( + (influencer?.fullName || "I").charAt(0).toUpperCase() + )} +
+
+
+

{influencer?.fullName || "Unknown Creator"}

+ {influencer?.isVerified && ( + + + Verified + + )} +
+
+ {influencer.categories.join(" & ")} + + + + New + +
+
+
-

{gig.title} @@ -439,7 +469,7 @@ function GigDetailsContent() { setIsModalOpen(true); }} disabled={!isInitialized || alreadyRequested || isRequestSuccess} - className="w-full bg-emerald-500 hover:bg-emerald-600 disabled:bg-slate-300 disabled:cursor-not-allowed disabled:shadow-none text-white py-5 rounded-2xl font-black text-lg transition-all shadow-lg flex items-center justify-center gap-3 group" + className="w-full bg-emerald-500 hover:bg-emerald-600 disabled:bg-slate-300 disabled:cursor-not-allowed disabled:shadow-none text-white py-5 rounded-2xl font-bold text-lg xl:text-xl transition-all shadow-lg flex items-center justify-center gap-3 group" > {alreadyRequested ? "Already Requested" : "Request Booking"} {!alreadyRequested && } diff --git a/apps/web/app/gig-list/page.tsx b/apps/web/app/gig-list/page.tsx index 5bd419a..5b6136d 100644 --- a/apps/web/app/gig-list/page.tsx +++ b/apps/web/app/gig-list/page.tsx @@ -260,6 +260,24 @@ export default function ExploreGigs() { const [committedSearch, setCommittedSearch] = useState(""); const [committedMaxPrice, setCommittedMaxPrice] = useState(MAX_PRICE_LIMIT); const [isFilterOpen, setIsFilterOpen] = useState(false); + const [isNavbarVisible, setIsNavbarVisible] = useState(true); + const [lastScrollY, setLastScrollY] = useState(0); + + useEffect(() => { + const handleScroll = () => { + const currentScrollY = window.scrollY; + if (currentScrollY < 10) { + setIsNavbarVisible(true); + } else if (currentScrollY > lastScrollY) { + setIsNavbarVisible(false); + } else { + setIsNavbarVisible(true); + } + setLastScrollY(currentScrollY); + }; + window.addEventListener("scroll", handleScroll, { passive: true }); + return () => window.removeEventListener("scroll", handleScroll); + }, [lastScrollY]); const fetchGigs = useCallback(async ( opts: { @@ -382,7 +400,7 @@ export default function ExploreGigs() {

{/* Premium Minimal Filter System */} -
+
{/* Unified Search Bar */}
diff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsx index cd70763..09fe50e 100644 --- a/apps/web/components/Navbar.tsx +++ b/apps/web/components/Navbar.tsx @@ -4,11 +4,11 @@ import React, { useState, useEffect, useRef } from "react"; import Link from "next/link"; import Image from "next/image"; import { usePathname, useRouter } from "next/navigation"; -import { - Menu, - X, - LogOut, - LayoutDashboard, +import { + Menu, + X, + LogOut, + LayoutDashboard, ChevronDown, User as UserIcon } from "lucide-react"; @@ -27,8 +27,27 @@ export default function Navbar() { const [isMenuOpen, setIsMenuOpen] = useState(false); const [isProfileOpen, setIsProfileOpen] = useState(false); const [profile, setProfile] = useState<{ fullName?: string; profileImageUrl?: string } | null>(null); + const [isVisible, setIsVisible] = useState(true); + const [lastScrollY, setLastScrollY] = useState(0); const dropdownRef = useRef(null); + useEffect(() => { + const handleScroll = () => { + const currentScrollY = window.scrollY; + if (currentScrollY < 10) { + setIsVisible(true); + } else if (currentScrollY > lastScrollY) { + setIsVisible(false); + } else { + setIsVisible(true); + } + setLastScrollY(currentScrollY); + }; + + window.addEventListener("scroll", handleScroll, { passive: true }); + return () => window.removeEventListener("scroll", handleScroll); + }, [lastScrollY]); + useEffect(() => { if (user) { api.get("/profile/get_profile") @@ -73,12 +92,11 @@ export default function Navbar() { const dashboardPath = user?.role === "INFLUENCER" ? "/influencer-dashboard" : "/brand-dashboard"; return ( - - - @@ -203,9 +221,9 @@ export default function Navbar() {
)} - + {/* Mobile Menu Toggle */} -