Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati0x committed Oct 10, 2024
1 parent f7d053a commit 3f0a90d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apps/web/components/PoolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export function PoolCard({ pool, tokenGarden }: Props) {
href={`${pathname}/${poolId}`}
className={`w-[275px] sm:min-w-[313px] ${isNewPool ? "shadow-2xl" : ""}`}
>
<header className="mb-4 flex flex-col w-full justify-between items-start gap-4">
<Skeleton isLoading={!ipfsResult} className="w-96 h-5">
<header className="mb-4 flex flex-col w-full justify-between items-start gap-2">
<Skeleton isLoading={!ipfsResult}>
<h3 className="flex items-start w-fit max-w-full">
<TooltipIfOverflow>{ipfsResult?.title}</TooltipIfOverflow>
</h3>
Expand Down
16 changes: 9 additions & 7 deletions apps/web/components/Skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ export const Skeleton = ({
rows = 1,
}: Props) => {
return isLoading ?
<div className="flex flex-col gap-1">
{Array(rows).fill(0).map((_, i) => (
<div
key={i}
className={`[--fallback-b3:#f0f0f0] skeleton h-4 w-full my-1 rounded-md ${className}`}
/>
))}
<div className="flex flex-col gap-1 w-full">
{Array(rows)
.fill(0)
.map((_, i) => (
<div
key={i}
className={`[--fallback-b3:#f0f0f0] skeleton h-5 w-full my-1 rounded-md ${className}`}
/>
))}
</div>
: <>{children}</>;
};

0 comments on commit 3f0a90d

Please sign in to comment.