Skip to content

Commit e31f40e

Browse files
authored
Merge pull request #1736 from codatio/fix-zendesk-messenger-disappearing
Stop widget disappearing on page change
2 parents 4856cf2 + e015839 commit e31f40e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/theme/DocItem/Layout/useZendesk.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@ const useZendesk = () => {
1717
script.onload = () => setIsLoaded(true);
1818

1919
document.body.appendChild(script);
20-
21-
return () => {
22-
// Check if the widget provides a specific cleanup function and call it here
23-
if (window.zE) {
24-
window.zE('messenger', 'hide'); // Example cleanup call, replace with actual if different
25-
}
26-
document.body.removeChild(script);
27-
setIsLoaded(false);
28-
}
2920
}, [siteConfig.customFields.ZENDESK_KEY, siteConfig.customFields.DEVELOPMENT]);
3021

3122
return isLoaded;

0 commit comments

Comments
 (0)