import { CSSProperties, useState } from "react"; import { UpsellEnhancedModal } from "./UpsellModal"; import { createPortal } from "react-dom"; interface LockedTableTypeProps { icon: JSX.Element; selected?: string; style?: CSSProperties; name: string; link?: string; } export default function LockedTableType({ icon, selected, style, name, link = "https://tableberg.com/pricing/", }: LockedTableTypeProps) { const [showUpsell, setVisibility] = useState(false); return ( <> {showUpsell && createPortal( setVisibility(false)} selected={selected} link={link} />, document.body )} ); }