Enhance loading skeletons and breadcrumbs

- Add content-m matching loading skeletons for ParkDetail, RideDetail, CompanyDetail, etc., replacing generic spinners to preserve layout during load
- Remove redundant Back to Parent Entity buttons in detail pages in favor of breadcrumb navigation
- Prepare groundwork for breadcrumbs across detail pages to improve cohesion and navigation
This commit is contained in:
gpt-engineer-app[bot]
2025-11-12 03:51:15 +00:00
parent fdfa1739e5
commit 3867d30aac
10 changed files with 361 additions and 101 deletions

View File

@@ -3,6 +3,7 @@ import { useParams, useNavigate, Link } from 'react-router-dom';
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@/components/ui/hover-card';
import { CompanyPreviewCard } from '@/components/preview/CompanyPreviewCard';
import { EntityBreadcrumb } from '@/components/navigation/EntityBreadcrumb';
import { ParkDetailSkeleton } from '@/components/loading/ParkDetailSkeleton';
import { Header } from '@/components/layout/Header';
import { getBannerUrls } from '@/lib/cloudflareImageUtils';
import { trackPageView } from '@/lib/viewTracking';
@@ -164,13 +165,7 @@ export default function ParkDetail() {
if (loading) {
return <div className="min-h-screen bg-background">
<Header />
<div className="container mx-auto px-4 py-8">
<div className="animate-pulse space-y-6">
<div className="h-64 bg-muted rounded-lg"></div>
<div className="h-8 bg-muted rounded w-1/2"></div>
<div className="h-4 bg-muted rounded w-1/3"></div>
</div>
</div>
<ParkDetailSkeleton />
</div>;
}
if (!park) {
@@ -203,13 +198,8 @@ export default function ParkDetail() {
className="mb-4"
/>
{/* Back Button and Edit Button */}
<div className="flex items-center justify-between mb-6">
<Button variant="ghost" onClick={() => navigate('/parks')}>
<ArrowLeft className="w-4 h-4 mr-2" />
Back to Parks
</Button>
{/* Edit Button */}
<div className="flex justify-end mb-6">
<Button
variant="outline"
onClick={() => requireAuth(() => setIsEditParkModalOpen(true), "Sign in to edit this park")}