Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 09:30 UTC
fix: eagerly load above-the-fold popular toolkit icons
Popular icons are visible immediately, so lazy loading them causes a flash of fallback text. Now only below-fold icons in the alphabetical list are lazy loaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 11, 2026 at 21:30 UTC
49ccaebf5df6269ed79b6d99c35709dbeeee397e
1 file changed
+5
-5
docs/components/toolkits/toolkits-landing.tsx
+5
-5
@@ -22,7 +22,7 @@ const POPULAR_SLUGS = [
22
'hubspot',
23
];
24
25
-function ToolkitIcon({ toolkit }: { toolkit: ToolkitSummary }) {
25
+function ToolkitIcon({ toolkit, lazy = true }: { toolkit: ToolkitSummary; lazy?: boolean }) {
26
const [imgFailed, setImgFailed] = useState(false);
27
const fallback = toolkit.name.trim().charAt(0).toUpperCase();
28
@@ -32,7 +32,7 @@ function ToolkitIcon({ toolkit }: { toolkit: ToolkitSummary }) {
32
<img
33
src={toolkit.logo}
34
alt=""
35
- loading="lazy"
35
+ loading={lazy ? 'lazy' : 'eager'}
36
decoding="async"
37
className="h-[65%] w-[65%] object-contain"
38
onError={() => setImgFailed(true)}
@@ -66,7 +66,7 @@ function CopySlugButton({ slug }: { slug: string }) {
66
);
67
}
68
69
-function ToolkitRow({ toolkit }: { toolkit: ToolkitSummary }) {
69
+function ToolkitRow({ toolkit, lazy = true }: { toolkit: ToolkitSummary; lazy?: boolean }) {
70
return (
71
<Link
72
href={`/toolkits/${toolkit.slug}`}
@@ -74,7 +74,7 @@ function ToolkitRow({ toolkit }: { toolkit: ToolkitSummary }) {
74
>
75
{/* Left side: Icon, Name, Slug */}
76
<div className="flex items-center gap-3">
77
- <ToolkitIcon toolkit={toolkit} />
77
+ <ToolkitIcon toolkit={toolkit} lazy={lazy} />
78
<div className="flex min-w-0 flex-1 flex-col gap-1 sm:flex-row sm:items-center sm:gap-3">
79
<span className="truncate text-sm font-medium text-fd-foreground">{toolkit.name.trim()}</span>
80
<CopySlugButton slug={toolkit.slug} />
@@ -218,7 +218,7 @@ export function ToolkitsLanding() {
218
<h2 className="mb-2 text-sm font-semibold text-fd-muted-foreground">Popular</h2>
219
<div className="divide-y divide-fd-border">
220
{popularToolkits.map((toolkit) => (
221
- <ToolkitRow key={toolkit.slug} toolkit={toolkit} />
221
+ <ToolkitRow key={toolkit.slug} toolkit={toolkit} lazy={false} />
222
))}
223
</div>
224
</div>