veza/apps/web/src/features/tracks/components/comments/CommentSectionSkeleton.tsx
senke 1006cc7e3a refactor(comments): modularize CommentSection with atomic sub-components
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 07:32:37 +01:00

28 lines
728 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { CommentThreadSkeleton } from '../comment-thread';
import { cn } from '@/lib/utils';
export interface CommentSectionSkeletonProps {
/** Number of skeleton rows (default 4) */
rows?: number;
className?: string;
}
/**
* Skeleton for the full comment section: mimics 34 comment rows.
* Uses only Tailwind spacing scale and layout primitives.
*/
export function CommentSectionSkeleton({
rows = 4,
className,
}: CommentSectionSkeletonProps) {
return (
<div
className={cn('space-y-4', className)}
data-testid="comment-section-skeleton"
>
{Array.from({ length: Math.min(Math.max(rows, 1), 6) }).map((_, i) => (
<CommentThreadSkeleton key={i} />
))}
</div>
);
}