Skip to content

Commit f416eb0

Browse files
committed
refactor(web): simplify Skeleton component structure
1 parent d7478b8 commit f416eb0

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

web/src/components/Skeleton.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,18 @@ const Skeleton = ({ type = "route", showCreator = false, count = 4, showEditor =
5959

6060
// Route or memo type: with optional wrapper
6161
return (
62-
<div className="w-full max-w-full px-4 py-6">
63-
<div className="w-full max-w-2xl mx-auto">
64-
{/* Editor skeleton - only for route type */}
65-
{type === "route" && showEditor && (
66-
<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">
67-
<div className="w-full h-12 bg-muted rounded" />
68-
</div>
69-
)}
62+
<div className="w-full max-w-2xl mx-auto">
63+
{/* Editor skeleton - only for route type */}
64+
{type === "route" && showEditor && (
65+
<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">
66+
<div className="w-full h-12 bg-muted rounded" />
67+
</div>
68+
)}
7069

71-
{/* Memo skeletons */}
72-
{Array.from({ length: count }).map((_, index) => (
73-
<MemoCardSkeleton key={index} showCreator={showCreator} index={index} />
74-
))}
75-
</div>
70+
{/* Memo skeletons */}
71+
{Array.from({ length: count }).map((_, index) => (
72+
<MemoCardSkeleton key={index} showCreator={showCreator} index={index} />
73+
))}
7674
</div>
7775
);
7876
};

0 commit comments

Comments
 (0)