Skip to content

Commit 896441b

Browse files
author
Boopathi
committed
Fix blog page crash issue
1 parent 9c4b5ce commit 896441b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/app/page.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ export default function Home() {
163163
}
164164
}, [theme]);
165165

166+
// Re-run Zoho SalesIQ trigger on SPA navigation
167+
useEffect(() => {
168+
if (typeof window !== 'undefined' && (window as any).$zoho && (window as any).$zoho.salesiq && (window as any).$zoho.salesiq.page) {
169+
(window as any).$zoho.salesiq.page.popup.close('all');
170+
(window as any).$zoho.salesiq.page.popup.show();
171+
}
172+
}, [activeView]);
173+
166174
const handleModalOpenChange = (view: View) => (isOpen: boolean) => {
167175
if (!isOpen) {
168176
setActiveView("home");
@@ -383,4 +391,4 @@ export default function Home() {
383391
);
384392
}
385393

386-
394+

0 commit comments

Comments
 (0)