/** * Lazy-loaded route components for code splitting * These components are loaded on-demand to improve initial bundle size */ import { lazy } from 'react'; import { motion } from 'framer-motion'; import { Calendar, MapPin, Users, Settings, Shield, CreditCard, QrCode, Scan } from 'lucide-react'; import { Card, CardHeader, CardBody } from '@/components/ui/Card'; import { Badge } from '@/components/ui/Badge'; import { Skeleton } from '@/components/loading/Skeleton'; // Lazy-loaded components export const EventDetailPage = lazy(() => import('@/pages/EventDetailPage')); export const GateOpsPage = lazy(() => import('@/pages/GateOpsPage').then(module => ({ default: module.GateOpsPage }))); export const PaymentSettings = lazy(() => import('@/features/org/PaymentSettings').then(module => ({ default: module.PaymentSettings }))); export const ScannerPage = lazy(() => import('@/features/scanner/ScannerPage').then(module => ({ default: module.ScannerPage }))); // Skeleton components for Suspense fallbacks /** * Event detail page skeleton with event header, stats, and ticket types */ export function EventDetailPageSkeleton() { return ( {/* Event header */} {/* Event stats */} {Array.from({ length: 4 }).map((_, index) => ( ))} {/* Ticket types section */} {Array.from({ length: 3 }).map((_, index) => ( ))} ); } /** * Gate operations page skeleton with live scanning interface */ export function GateOpsPageSkeleton() { return ( {/* Status header */} {Array.from({ length: 3 }).map((_, index) => ( ))} {/* Control panel */} {Array.from({ length: 5 }).map((_, index) => ( ))} ); } /** * Payment settings page skeleton with Stripe integration status */ export function PaymentSettingsPageSkeleton() { return ( {/* Connection status card */} {/* Payment configuration */} {/* Form fields */} {Array.from({ length: 4 }).map((_, index) => ( ))} {/* Settings toggles */} {Array.from({ length: 3 }).map((_, index) => ( ))} ); } /** * Scanner page skeleton with camera interface */ export function ScannerPageSkeleton() { return ( {/* Scanner header */} {/* Camera viewport */} {/* Scanner controls */} {Array.from({ length: 4 }).map((_, index) => ( ))} {/* Recent scans */} {Array.from({ length: 5 }).map((_, index) => ( ))} ); }