Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

docs: fix portal timing bug for integration tabs header

Sushmitha Malleshb05a34ec2e1f
diff --git a/docs/components/quickstart/integration-tabs.tsx b/docs/components/quickstart/integration-tabs.tsx
index 1edad048f..53290fbf3 100644
--- a/docs/components/quickstart/integration-tabs.tsx
+++ b/docs/components/quickstart/integration-tabs.tsx
@@ -28,7 +28,21 @@ function IntegrationTabsHeader({ tabs }: { tabs: TabConfig[] }) {
const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);
useEffect(() => {
- setPortalTarget(document.getElementById('integration-tabs-portal'));
+ const target = document.getElementById('integration-tabs-portal');
+ if (target) {
+ setPortalTarget(target);
+ return;
+ }
+ // Portal target may not exist yet (frameworks register asynchronously via useEffect)
+ const observer = new MutationObserver(() => {
+ const el = document.getElementById('integration-tabs-portal');
+ if (el) {
+ setPortalTarget(el);
+ observer.disconnect();
+ }
+ });
+ observer.observe(document.body, { childList: true, subtree: true });
+ return () => observer.disconnect();
}, []);
const header = (
diff --git a/docs/components/quickstart/quickstart-flow.tsx b/docs/components/quickstart/quickstart-flow.tsx
index bbe8ae260..f917bb8e6 100644
--- a/docs/components/quickstart/quickstart-flow.tsx
+++ b/docs/components/quickstart/quickstart-flow.tsx
@@ -176,7 +176,7 @@ export function QuickstartFlow({ children }: QuickstartFlowProps) {
))}
<Link
href="/docs/providers"
- className="flex items-center gap-3 rounded-lg border border-dashed border-fd-border px-3 py-2.5 text-left transition-all hover:bg-fd-accent/50 hover:border-fd-muted-foreground"
+ className="flex items-center gap-3 rounded-lg border border-dashed border-fd-border px-3 py-2.5 transition-all hover:bg-fd-accent/50 hover:border-fd-muted-foreground"
>
<span className="flex h-6 w-6 shrink-0 items-center justify-center text-fd-muted-foreground">→</span>
<span className="text-sm font-medium text-fd-muted-foreground">Other providers</span>