import { Alert, Button, Card, Center, Loader, Stack, Text } from "@mantine/core"; import { MessageSquare, TriangleAlert } from "lucide-react"; import { PageContainer, PageHeader } from "@/components/page"; import { useChatSso } from "@/features/chat/useChatSso"; /** * Chat itself lives at chat.edr.et (Element), not in this app — this page's * only job is a fresh one-click sign-in link into it. A real `` (not * `window.open()` in a click handler) so the browser never treats it as a * blocked popup, and no iframe: Element's own CSP refuses to be framed. */ export default function ChatLaunchPage() { const { data: url, isLoading, isError, refetch } = useChatSso(); return (
{isLoading && } {isError && ( } color="red" title="Couldn't get a sign-in link" variant="light" > Something went wrong reaching chat. Try again. )} {url && ( Opens EDR Chat in a new tab, already signed in as you. )}
); }