You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
785 B
30 lines
785 B
import Script from 'next/script'
|
|
import React from 'react'
|
|
|
|
export default function LiveChat() {
|
|
if (!process.env.NEXT_PUBLIC_TAWKTO_EMBED_URL) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<Script
|
|
id='tawkto'
|
|
strategy='afterInteractive'
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
|
|
(function(){
|
|
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
|
|
s1.async=true;
|
|
s1.src='${process.env.NEXT_PUBLIC_TAWKTO_EMBED_URL}';
|
|
s1.charset='UTF-8';
|
|
s1.setAttribute('crossorigin','*');
|
|
s0.parentNode.insertBefore(s1,s0);
|
|
})();
|
|
`,
|
|
}}
|
|
/>
|
|
</>
|
|
)
|
|
}
|