feat: Mobile header redesign, shop breadcrumbs fix, checkout address/wallet/contrast improvements and forgot password flow
This commit is contained in:
1 parent
c125da25ab
commit
20a1b225c8
4 files changed
+421
-91
No files matched your search
@@ -300,39 +300,39 @@ export default function Header({
|
||||
|
||||
<div className="flex gap-1.5 sm:gap-2 items-center h-12">
|
||||
{isLoggedIn ? (
|
||||
<div className="flex items-center h-full gap-1.5 sm:gap-2 p-1 bg-medical-gray-50/50 border border-medical-gray-100 rounded-3xl">
|
||||
{/* User Name (Direct link to dashboard) */}
|
||||
<div className="flex items-center h-full gap-1 sm:gap-2 p-1 bg-medical-gray-50/50 border border-medical-gray-100 rounded-3xl">
|
||||
{/* User Icon/Name (Direct link to dashboard) */}
|
||||
<div
|
||||
className="flex items-center gap-1.5 sm:gap-2.5 px-2.5 sm:px-4 py-2 hover:bg-white rounded-2xl cursor-pointer transition-all border border-transparent hover:border-medical-gray-200"
|
||||
className="flex items-center gap-1 sm:gap-2.5 px-2 sm:px-4 py-2 hover:bg-white rounded-2xl cursor-pointer transition-all border border-transparent hover:border-medical-gray-200 min-w-0"
|
||||
onClick={() => onNavigate("user-dashboard")}
|
||||
>
|
||||
<User className="w-4 h-4 sm:w-5 sm:h-5 text-canina-blue" />
|
||||
<span className="text-[12px] sm:text-[14px] font-black font-vazir text-medical-gray-900 leading-none">
|
||||
<User className="w-4 h-4 sm:w-5 sm:h-5 text-canina-blue flex-shrink-0" />
|
||||
<span className="hidden sm:inline text-[14px] font-black font-vazir text-medical-gray-900 leading-none truncate max-w-[80px]">
|
||||
{profile.firstName}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Separator Line */}
|
||||
<div className="w-[1.5px] h-4 sm:h-5 bg-medical-gray-200" />
|
||||
<div className="w-[1.5px] h-4 sm:h-5 bg-medical-gray-200 flex-shrink-0" />
|
||||
|
||||
{/* Pet Name & Switcher */}
|
||||
{/* Pet Icon & Switcher */}
|
||||
<div className="relative h-full flex items-center" ref={petMenuRef}>
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center gap-1.5 sm:gap-2.5 px-2.5 sm:px-4 py-2 rounded-2xl transition-all cursor-pointer",
|
||||
"flex items-center gap-1 sm:gap-2.5 px-2 sm:px-4 py-2 rounded-2xl transition-all cursor-pointer min-w-0",
|
||||
isPetSwitcherOpen ? "bg-canina-blue text-white shadow-lg shadow-canina-blue/20" : "text-canina-blue hover:bg-white"
|
||||
)}
|
||||
onClick={() => setIsPetSwitcherOpen(!isPetSwitcherOpen)}
|
||||
>
|
||||
{activePet?.type === "گربه" ? (
|
||||
<Cat className={cn("w-4 h-4 sm:w-5 sm:h-5", isPetSwitcherOpen ? "text-white" : "text-canina-blue/60")} />
|
||||
<Cat className={cn("w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0", isPetSwitcherOpen ? "text-white" : "text-canina-blue/60")} />
|
||||
) : (
|
||||
<Dog className={cn("w-4 h-4 sm:w-5 sm:h-5", isPetSwitcherOpen ? "text-white" : "text-canina-blue/60")} />
|
||||
<Dog className={cn("w-4 h-4 sm:w-5 sm:h-5 flex-shrink-0", isPetSwitcherOpen ? "text-white" : "text-canina-blue/60")} />
|
||||
)}
|
||||
<span className={cn("text-[12px] sm:text-[14px] font-black font-vazir leading-none", isPetSwitcherOpen ? "text-white" : "text-canina-blue")}>
|
||||
<span className={cn("hidden sm:inline text-[14px] font-black font-vazir leading-none truncate max-w-[80px]", isPetSwitcherOpen ? "text-white" : "text-canina-blue")}>
|
||||
{activePet?.name || "بدون پت"}
|
||||
</span>
|
||||
<ChevronDown className={cn("w-3.5 h-3.5 sm:w-4 sm:h-4 transition-transform", isPetSwitcherOpen ? "rotate-180" : "")} />
|
||||
<ChevronDown className={cn("w-3 h-3 sm:w-4 sm:h-4 transition-transform flex-shrink-0", isPetSwitcherOpen ? "rotate-180" : "")} />
|
||||
</div>
|
||||
|
||||
<AnimatePresence>
|
||||
|
||||
Reference in new issue
Block a user