mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Changed the crips-wrapper to only use crisp when env is set (#4139)
This commit is contained in:
parent
7bec244a67
commit
2ea6d70fac
@ -21,6 +21,7 @@ const CrispWrapper: FC<ICrispWrapper> = (props) => {
|
|||||||
if (typeof window && user?.email) {
|
if (typeof window && user?.email) {
|
||||||
window.$crisp = [];
|
window.$crisp = [];
|
||||||
window.CRISP_WEBSITE_ID = process.env.NEXT_PUBLIC_CRISP_ID;
|
window.CRISP_WEBSITE_ID = process.env.NEXT_PUBLIC_CRISP_ID;
|
||||||
|
if (window.CRISP_WEBSITE_ID != null) {
|
||||||
(function () {
|
(function () {
|
||||||
const d = document;
|
const d = document;
|
||||||
const s = d.createElement("script");
|
const s = d.createElement("script");
|
||||||
@ -32,6 +33,7 @@ const CrispWrapper: FC<ICrispWrapper> = (props) => {
|
|||||||
window.$crisp.push(["do", "chat:close"]);
|
window.$crisp.push(["do", "chat:close"]);
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, [user?.email]);
|
}, [user?.email]);
|
||||||
|
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
|
Loading…
Reference in New Issue
Block a user