import * as Tooltip from '@radix-ui/react-tooltip'; import { useEffect, useState } from 'react'; import { useChatDeployment } from '~/lib/hooks/useChatDeployment'; import { DeploymentPlatformEnum } from '~/types/deployment'; export function VercelDeploymentLink() { const [deploymentUrl, setDeploymentUrl] = useState(undefined); const { getDeploymentByPlatform } = useChatDeployment(); useEffect(() => { setDeploymentUrl(getDeploymentByPlatform(DeploymentPlatformEnum.VERCEL)?.url || ''); }, [getDeploymentByPlatform]); return ( deploymentUrl && ( { e.stopPropagation(); }} >
{deploymentUrl} ) ); }