fix(blog): highlight in-article links and trigger support chat from smart advisor button
Deploy Canina / deploy (push) Successful in 2m44s
Deploy Canina / deploy (push) Successful in 2m44s
This commit is contained in:
1 parent
ff6f04fe46
commit
0b5f2a88cc
4 files changed
+34
-8
No files matched your search
@@ -43,6 +43,12 @@ export default function SupportChat() {
|
||||
return () => { active = false; clearInterval(timer); window.removeEventListener('focus', refresh); };
|
||||
}, []);
|
||||
const chatScrollRef = useRef<HTMLDivElement | null>(null);
|
||||
useEffect(() => {
|
||||
const handleOpenSupport = () => setOpen(true);
|
||||
window.addEventListener('canina:open-support-chat', handleOpenSupport);
|
||||
return () => window.removeEventListener('canina:open-support-chat', handleOpenSupport);
|
||||
}, []);
|
||||
|
||||
const historyKey = useRef('');
|
||||
const pathname = usePathname();
|
||||
const isPdpPage = pathname?.startsWith('/shop/') && pathname !== '/shop';
|
||||
|
||||
Reference in new issue
Block a user