[dyad] Added skeleton loader and improved UI - wrote 3 file(s)

This commit is contained in:
[dyad]
2026-01-20 13:36:25 +01:00
parent d8b984f13f
commit 31835cda52
3 changed files with 69 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import { extractMetaData } from "@/app/actions";
import { LengthIndicator } from "./length-indicator";
import { CopyButton } from "./copy-button";
import { SerpPreview } from "./serp-preview";
import { ResultsSkeleton } from "./results-skeleton";
interface MetaData {
title: string;
@@ -105,7 +106,9 @@ export function MetaForm() {
)}
</form>
{error && (
{loading && <ResultsSkeleton />}
{!loading && error && (
<Card className="border-destructive bg-destructive/10">
<CardContent className="p-4">
<p className="text-destructive text-center">{error}</p>
@@ -113,7 +116,7 @@ export function MetaForm() {
</Card>
)}
{metaData && (
{!loading && metaData && (
<Card className="w-full shadow-lg rounded-lg">
<CardHeader>
<CardTitle className="text-xl text-card-foreground">