75 lines
2.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { useEffect } from 'react';
import { useRouter } from 'next/router';
import Link from 'next/link';
export default function Home() {
const router = useRouter();
useEffect(() => {
// 检查是否有用户登录,如果有则重定向到仪表盘
const checkAuth = async () => {
try {
// 这里可以添加用户认证检查
// 暂时跳过自动重定向
} catch (error) {
console.error('Auth check error:', error);
}
};
checkAuth();
}, [router]);
return (
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
<div className="container mx-auto px-4 py-16">
<div className="text-center">
<h1 className="text-4xl font-bold text-gray-900 mb-8">
</h1>
<p className="text-xl text-gray-600 mb-12">
</p>
<div className="grid md:grid-cols-2 gap-8 max-w-4xl mx-auto">
<div className="bg-white rounded-lg shadow-lg p-8">
<h2 className="text-2xl font-semibold text-gray-800 mb-4">
</h2>
<p className="text-gray-600 mb-6">
访
</p>
<Link
href="/auth/login"
className="inline-block bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition-colors"
>
</Link>
</div>
<div className="bg-white rounded-lg shadow-lg p-8">
<h2 className="text-2xl font-semibold text-gray-800 mb-4">
</h2>
<ul className="text-left text-gray-600 space-y-2">
<li> </li>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
</ul>
</div>
</div>
<div className="mt-12">
<Link
href="/dashboard"
className="inline-block bg-green-600 text-white px-8 py-4 rounded-lg hover:bg-green-700 transition-colors text-lg"
>
</Link>
</div>
</div>
</div>
</div>
);
}