import { Skeleton } from "@/components/ui/skeleton" import ProductGridSkeleton from "./ProductGridSkeleton" import CartItemSkeleton from "./CartItemSkeleton" // Added import for CartItemSkeleton interface PageLoaderProps { /** * Type of page loading skeleton * home, products, category, search, cart, favorites, orders, profile */ type?: "home" | "products" | "category" | "search" | "cart" | "favorites" | "orders" | "profile" } export default function PageLoader({ type = "products" }: PageLoaderProps) { switch (type) { case "home": return (
{/* Hero Banner */} {/* Categories */}
{Array.from({ length: 6 }).map((_, i) => ( ))}
{/* Products */}
) case "products": case "search": return (
) case "category": return (
{/* Filters Sidebar */}
{Array.from({ length: 3 }).map((_, i) => (
))}
{/* Products */}
) case "cart": return (
{Array.from({ length: 3 }).map((_, i) => ( ))}
{/* Order Summary */}
{Array.from({ length: 6 }).map((_, i) => ( ))}
) case "orders": case "favorites": return (
{Array.from({ length: 6 }).map((_, i) => ( ))}
) case "profile": return (
{Array.from({ length: 5 }).map((_, i) => (
))}
) default: return } }