We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0fa5b0 commit 2b74932Copy full SHA for 2b74932
apps/webapp/app/hooks/useKapaWidget.tsx
@@ -90,6 +90,7 @@ export function useKapaWidget() {
90
91
window.Kapa("render", {
92
onRender: () => {
93
+ //this auto-opens the Kapa widget on page load if the query contains ?aiHelp=
94
const aiHelp = searchParams.get("aiHelp");
95
if (aiHelp) {
96
setSearchParams((prev) => {
@@ -99,6 +100,7 @@ export function useKapaWidget() {
99
100
101
//we need to decode the aiHelp string because it's urlencoded
102
const decodedAiHelp = decodeURIComponent(aiHelp);
103
+ //sadly this delay is required, otherwise it fails the Kapa browser verification…
104
setTimeout(() => {
105
openKapa(decodedAiHelp);
106
}, 500);
0 commit comments