first save

This commit is contained in:
Mikuisnotavailable
2025-07-30 02:56:32 +08:00
parent 7b2dda22b9
commit c903bf5284
32 changed files with 2766 additions and 803 deletions

View File

@@ -0,0 +1,37 @@
// src/app/dashboard/page.tsx
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/api/auth';
import { redirect } from 'next/navigation';
import SkinGrid from '@/components/skins/SkinGrid';
export default async function Dashboard() {
const session = await getServerSession(authOptions);
if (!session) {
redirect('/login');
}
// 安全地获取用户ID
const userId = session.user?.id || 'unknown';
// 实际应用中这里会从API获取用户皮肤数据
const mockSkins = [
{ id: '1', name: 'Steve皮肤', createdAt: '2023-05-01' },
{ id: '2', name: 'Alex皮肤', createdAt: '2023-05-15' },
];
return (
<div>
<h1 className="text-3xl font-bold mb-6"></h1>
<div className="mb-6">
<a
href="/skins/upload"
className="bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded"
>
</a>
</div>
<SkinGrid skins={mockSkins} />
</div>
);
}