We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00a6270 commit cb6c54fCopy full SHA for cb6c54f
1 file changed
apps/webapp/app/components/AskAI.tsx
@@ -91,19 +91,15 @@ function AskAIProvider({ websiteId }: AskAIProviderProps) {
91
useEffect(() => {
92
const aiHelp = searchParams.get("aiHelp");
93
if (aiHelp) {
94
- const decodedAiHelp = decodeURIComponent(aiHelp);
95
-
96
// Delay to avoid hCaptcha bot detection
97
- const timeoutId = window.setTimeout(() => openAskAI(decodedAiHelp), 1000);
+ window.setTimeout(() => openAskAI(aiHelp), 1000);
98
99
// Clone instead of mutating in place
100
const next = new URLSearchParams(searchParams);
101
next.delete("aiHelp");
102
setSearchParams(next);
103
104
- return () => clearTimeout(timeoutId);
105
}
106
- }, [searchParams.toString(), openAskAI]);
+ }, [searchParams, openAskAI]);
107
108
return (
109
<KapaProvider
0 commit comments