Add skeleton loading UI for better perceived performance

Replace "로딩 중..." text with animated skeleton placeholders in
RestaurantList, RestaurantDetail, and ReviewSection components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
joungmin
2026-03-09 11:08:03 +09:00
parent 6c47d3c57d
commit 4d09be2419
5 changed files with 121 additions and 4 deletions

View File

@@ -200,7 +200,18 @@ export default function ReviewSection({ restaurantId }: ReviewSectionProps) {
<h3 className="font-semibold text-sm mb-2"></h3>
{loading ? (
<p className="text-sm text-gray-500"> ...</p>
<div className="space-y-3 animate-pulse">
<div className="flex items-center gap-2">
<div className="h-4 w-24 bg-gray-200 rounded" />
<div className="h-4 w-8 bg-gray-200 rounded" />
</div>
{[1, 2].map((i) => (
<div key={i} className="space-y-1">
<div className="h-3 w-20 bg-gray-200 rounded" />
<div className="h-3 w-full bg-gray-200 rounded" />
</div>
))}
</div>
) : (
<>
{reviewCount > 0 && avgRating !== null && (