'use client'; import Link from 'next/link'; import { Icon } from './Icons'; /** * Skeleton component for deployment detail page * Matches the layout of DeploymentDashboard for a seamless loading experience */ export function DeploymentSkeleton() { return (
{/* Header section with app name and actions */}
{/* Action buttons skeleton */}
{/* Tab navigation skeleton */}
{['Deployment', 'Logs', 'Resources', 'Source'].map((tab, i) => (
))}
{/* Main content card skeleton */}
{/* Card header */}
{/* Main content: Preview + Metadata Grid */}
{/* Preview thumbnail skeleton */}
{/* Metadata grid skeleton */}
{/* Created */} {/* Status */} {/* Health */} {/* Duration */} {/* Environment */} {/* Domains */} {/* Source */}
{/* Collapsible sections skeleton */} {['Deployment Settings', 'Build Logs', 'Container Stats', 'Deployment Summary'].map( (section, i) => (
{i === 1 && (
)}
) )} {/* Action Cards Grid skeleton */}
{[...Array(4)].map((_, i) => ( ))}
{/* Footer link skeleton */}
); } /** * Skeleton for metadata rows */ function MetadataRowSkeleton({ hasIndicator = false, hasBadge = false, hasSecondLine = false, }: { hasIndicator?: boolean; hasBadge?: boolean; hasSecondLine?: boolean; }) { return (
{hasIndicator && (
)}
{hasBadge && (
)}
{hasSecondLine && (
)}
); } /** * Skeleton for action cards */ function ActionCardSkeleton() { return (
); } /** * Error state component for deployment page */ export function DeploymentError({ error, uuid, }: { error: string; uuid: string; }) { return (

{error}

{error === 'Deployment not found' ? ( <> The deployment with UUID "{uuid}" could not be found. It may have been deleted or never existed. ) : ( <> Unable to load deployment details. This could be due to a network issue or the deployment service being temporarily unavailable. )}

Back to Deployments
); } /** * Empty state component for when no deployment data exists */ export function DeploymentEmpty({ uuid }: { uuid: string }) { return (

No deployment data

The deployment "{uuid.substring(0, 9)}" exists but has no data available yet. It may still be initializing.

Back to Deployments
); }