mirror of
https://github.com/mroxso/zelo-news.git
synced 2026-06-14 00:28:49 +02:00
fix: remove loading skeleton from HighlightsSection component
This commit is contained in:
@@ -2,7 +2,6 @@ import type { NostrEvent } from '@nostrify/nostrify';
|
||||
import { useHighlights } from '@/hooks/useHighlights';
|
||||
import { Highlight } from './Highlight';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
import { Highlighter } from 'lucide-react';
|
||||
|
||||
interface HighlightsSectionProps {
|
||||
@@ -20,34 +19,7 @@ export function HighlightsSection({
|
||||
const { data: highlights, isLoading } = useHighlights(event);
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<Card className={className}>
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2">
|
||||
<Highlighter className="h-5 w-5" />
|
||||
{title}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
{[1, 2].map((i) => (
|
||||
<Card key={i} className="border-l-4 border-l-yellow-500/50">
|
||||
<CardContent className="p-4">
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center gap-3">
|
||||
<Skeleton className="h-8 w-8 rounded-full" />
|
||||
<div className="space-y-1 flex-1">
|
||||
<Skeleton className="h-4 w-24" />
|
||||
<Skeleton className="h-3 w-16" />
|
||||
</div>
|
||||
</div>
|
||||
<Skeleton className="h-16 w-full" />
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
return null; // Don't show loading state - just hide the section
|
||||
}
|
||||
|
||||
if (!highlights || highlights.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user