import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, Text, Stack, Link, } from '@chakra-ui/react' import React, { useEffect, useState } from 'react' type Props = { isOpen: boolean onClose: () => void } const localStorageKey = 'typebot-20-modal' export const AnnoucementModal = ({ isOpen, onClose }: Props) => { const [show, setShow] = useState(false) useEffect(() => { if (!localStorage.getItem(localStorageKey)) setShow(true) // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const handleCloseClick = () => { localStorage.setItem(localStorageKey, 'hide') setShow(false) onClose() } if (!show) return <> return ( What's new in Typebot 2.0? Typebo 2.0 has been launched February the 15th 🎉.