import { useNavigate, useRouter } from '@tanstack/react-router'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
type GeneralErrorProps = React.HTMLAttributes & {
minimal?: boolean
}
export function GeneralError({
className,
minimal = false,
}: GeneralErrorProps) {
const navigate = useNavigate()
const { history } = useRouter()
return (
{!minimal && (
500
)}
Oops! Something went wrong {`:')`}
We apologize for the inconvenience. Please try again later.
{!minimal && (
history.go(-1)}>
Go Back
navigate({ to: '/' })}>Back to Home
)}
)
}