import { Check, Mail } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useState } from 'react'
import { Button, cn, DialogSectionSeparator } from 'ui'
import { Admonition } from 'ui-patterns'
import { LinkSupportTicketForm } from './LinkSupportTicketForm'
export function LinkSupportTicketPage() {
return (
)
}
function LinkSupportTicketPageContent() {
const router = useRouter()
const conversationId = router.query.conversationId as string | undefined
const [isSuccess, setIsSuccess] = useState(false)
// Wait for router to be ready before checking for conversationId
if (!router.isReady) {
return null
}
if (!conversationId) {
return (
)
}
return (
{isSuccess ? (
) : (
setIsSuccess(true)}
/>
)}
)
}
function LinkSupportTicketSuccess() {
return (
Support ticket linked
Your support conversation has been linked to your account.