import { Link, Outlet, useLocation } from "@remix-run/react"; import { ShoppingBag, MessageCircle, CircleFadingPlus, BookmarkMinus, Layers, Wallet, MapPin, Settings, LogOut, CircleUserRound, } from "lucide-react"; import { useServiceGetProfile } from "~/utils/RequestHandler"; import { useRootData } from "~/hooks/use-root-data"; import { useBadgeCounts } from "~/hooks/useBadgeCounts"; const NAV = [ { label: "سفارش‌ها", to: "/profile/orders", icon: ShoppingBag, badgeKey: "order_updates" as const }, { label: "پیام‌ها", to: "/profile/threads", icon: MessageCircle, badgeKey: "chat" as const }, { label: "دنبال‌شده‌ها", to: "/profile/following", icon: CircleFadingPlus }, { label: "ذخیره‌شده‌ها", to: "/profile/bookmarks", icon: BookmarkMinus }, { label: "ست‌های من", to: "/profile/sets", icon: Layers }, { label: "کیف پول", to: "/profile/wallet", icon: Wallet }, { label: "آدرس‌ها", to: "/profile/location", icon: MapPin }, { label: "تنظیمات", to: "/profile/setting", icon: Settings }, ]; /** * Layout for the account area. On desktop it renders a sticky sidebar * (user card + menu) next to the page content; on mobile it's just the * page content (each profile page keeps its existing mobile UI). */ export default function ProfileLayout() { const location = useLocation(); const { user } = useRootData(); const { data: profile } = useServiceGetProfile(); const { data: badges } = useBadgeCounts(); const isActive = (to: string) => location.pathname === to || location.pathname.startsWith(to + "/"); return (
{/* Desktop sidebar */} {/* Page content */}
); }