refactor(web): simplify Skeleton component structure
This commit is contained in:
parent
d7478b8003
commit
f416eb00b0
1 changed files with 11 additions and 13 deletions
|
|
@ -59,20 +59,18 @@ const Skeleton = ({ type = "route", showCreator = false, count = 4, showEditor =
|
||||||
|
|
||||||
// Route or memo type: with optional wrapper
|
// Route or memo type: with optional wrapper
|
||||||
return (
|
return (
|
||||||
<div className="w-full max-w-full px-4 py-6">
|
<div className="w-full max-w-2xl mx-auto">
|
||||||
<div className="w-full max-w-2xl mx-auto">
|
{/* Editor skeleton - only for route type */}
|
||||||
{/* Editor skeleton - only for route type */}
|
{type === "route" && showEditor && (
|
||||||
{type === "route" && showEditor && (
|
<div className="relative flex flex-col justify-start items-start bg-card w-full px-4 py-3 mb-4 gap-2 rounded-lg border border-border animate-pulse">
|
||||||
<div className="relative flex flex-col justify-start items-start bg-card w-full px-4 py-3 mb-4 gap-2 rounded-lg border border-border animate-pulse">
|
<div className="w-full h-12 bg-muted rounded" />
|
||||||
<div className="w-full h-12 bg-muted rounded" />
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Memo skeletons */}
|
{/* Memo skeletons */}
|
||||||
{Array.from({ length: count }).map((_, index) => (
|
{Array.from({ length: count }).map((_, index) => (
|
||||||
<MemoCardSkeleton key={index} showCreator={showCreator} index={index} />
|
<MemoCardSkeleton key={index} showCreator={showCreator} index={index} />
|
||||||
))}
|
))}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue