import Link from 'next/link' import type { ResponseError } from 'types' import { AlertDescription_Shadcn_, AlertTitle_Shadcn_, Alert_Shadcn_, Button, IconAlertCircle, } from 'ui' export interface AlertErrorProps { ref?: string subject?: string error?: ResponseError | null className?: string } // [Joshen] To standardize the language for all error UIs const AlertError = ({ ref, subject, error, className }: AlertErrorProps) => { const subjectString = subject?.replace(/ /g, '%20') let href = `/support/new?category=dashboard_bug` if (ref) href += `&ref=${ref}` if (subjectString) href += `&subject=${subjectString}` if (error) href += `&message=Error:%20${error.message}` const formattedErrorMessage = error?.message.includes('503') ? '503 Service Temporarily Unavailable' : error?.message return ( {subject}
{error?.message &&

Error: {formattedErrorMessage}

}

Try refreshing your browser, but if the issue persists, please reach out to us via support.

) } export default AlertError