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

@@ -1,6 +1,7 @@
import { useState, useEffect, lazy, Suspense } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import { EntityBreadcrumb } from '@/components/navigation/EntityBreadcrumb';
import { CompanyDetailSkeleton } from '@/components/loading/CompanyDetailSkeleton';
import { Header } from '@/components/layout/Header';
import { getBannerUrls } from '@/lib/cloudflareImageUtils';
import { Button } from '@/components/ui/button';
@@ -150,12 +151,7 @@ export default function DesignerDetail() {
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>
</div>
<CompanyDetailSkeleton />
</div>
);
}
@@ -191,13 +187,8 @@ export default function DesignerDetail() {
className="mb-4"
/>
{/* Back Button and Edit Button */}
<div className="flex items-center justify-between mb-6">
<Button variant="ghost" onClick={() => navigate('/designers')}>
<ArrowLeft className="w-4 h-4 mr-2" />
Back to Designers
</Button>
{/* Edit Button */}
<div className="flex justify-end mb-6">
<Button
variant="outline"
onClick={() => requireAuth(() => setIsEditModalOpen(true), "Sign in to edit this designer")}