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.

fix: preserve query parameters in copied heading URLs

Sushmithamallesh9bfba58702ce
diff --git a/docs/components/heading.tsx b/docs/components/heading.tsx
index 879db6c09..a64f6a1a5 100644
--- a/docs/components/heading.tsx
+++ b/docs/components/heading.tsx
@@ -31,7 +31,7 @@ function HeadingAnchor({ id, children }: { id: string; children: React.ReactNode
const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
e.preventDefault();
- const url = `${window.location.origin}${window.location.pathname}#${id}`;
+ const url = `${window.location.origin}${window.location.pathname}${window.location.search}#${id}`;
window.history.replaceState(null, '', `#${id}`);
navigator.clipboard.writeText(url).then(() => {
setCopied(true);