refactor: 抽取 UI 组件、改进错误页面、统一导入路径并简化数据库接口

This commit is contained in:
2026-04-02 00:13:43 +08:00
parent 4ec4576fc5
commit c67e773086
10 changed files with 197 additions and 136 deletions
+22 -2
View File
@@ -1,3 +1,23 @@
export function NotFoundComponent() {
return <div>404 - Not Found</div>
import { Link } from '@tanstack/react-router'
export const NotFoundComponent = () => {
return (
<div className="min-h-screen flex items-center justify-center bg-slate-50 px-4">
<div className="max-w-md w-full text-center space-y-6">
<div className="inline-flex items-center justify-center w-16 h-16 rounded-full bg-slate-100">
<span className="text-3xl font-bold text-slate-400">404</span>
</div>
<div>
<h1 className="text-2xl font-bold text-slate-900"></h1>
<p className="text-slate-500 mt-2">访</p>
</div>
<Link
to="/"
className="inline-block px-6 py-2.5 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl font-medium transition-colors"
>
</Link>
</div>
</div>
)
}