Files
assetx/webapp/app/error.tsx
default 2ee4553b71 init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、
antdesign(管理后台)、landingpage(营销落地页)、
数据库 SQL 和配置文件。
2026-03-27 11:26:43 +00:00

31 lines
765 B
TypeScript

'use client'
import { useEffect } from 'react'
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
}) {
useEffect(() => {
console.error('Application error:', error)
}, [error])
return (
<div className="flex min-h-screen flex-col items-center justify-center gap-4 px-4">
<h2 className="text-xl font-semibold text-gray-900">Something went wrong</h2>
<p className="text-sm text-gray-500">
An unexpected error occurred. Please try again.
</p>
<button
onClick={reset}
className="rounded-lg bg-emerald-600 px-6 py-2 text-sm font-medium text-white hover:bg-emerald-700 transition-colors"
>
Try again
</button>
</div>
)
}