import { AlertIcon } from '@primer/octicons-react'; import { isRouteErrorResponse, useRouteError } from 'react-router'; import { cn } from '~/utils/cn'; import Card from './Card'; import Code from './Code'; interface Props { type?: 'full' | 'embedded'; } export function ErrorPopup({ type = 'full' }: Props) { const error = useRouteError(); const routing = isRouteErrorResponse(error); const message = error instanceof Error ? error.message : 'An unexpected error occurred'; return (
{message}}