This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
tony f4d67450f0 Added contact button that calls the VideoAsk
widget and opens the chat window.
2023-04-20 10:31:32 -07:00

30 lines
703 B
JavaScript

import { useEffect, useState } from 'react';
const VideoAsk = () => {
const [isMounted, setIsMounted] = useState(false);
useEffect(() => {
setIsMounted(true);
if (isMounted) {
window.VIDEOASK_EMBED_CONFIG = {
"kind": "widget",
"url": "https://www.videoask.com/f8fah1r34",
"options": {
"widgetType": "VideoThumbnailSmall",
"text": "Talk",
"backgroundColor": "#FFFFFF",
"position": "bottom-right",
"dismissible": true
}
};
const script = document.createElement('script');
script.src = 'https://www.videoask.com/embed/embed.js';
script.async = true;
document.body.appendChild(script);
}
}, [isMounted]);
return null;
};
export default VideoAsk;