Implement profile management (task 14)
- Add updateProfile and updatePassword server actions - Add getUserProfile function with sensitive data protection - Create ProfileForm component for name and email updates - Create PasswordChangeForm component with current password verification - Create profile page at /profile with all profile management features - Add profile and invitations navigation links to main page - Implement email uniqueness validation - Implement password hashing on password change Requirements: 7.1, 7.2, 7.3, 7.4, 7.5
This commit is contained in:
23
app/page.tsx
23
app/page.tsx
@@ -3,17 +3,38 @@ import ListCard from '@/components/ListCard'
|
||||
import NewListButton from '@/components/NewListButton'
|
||||
import GlobalSearch from '@/components/GlobalSearch'
|
||||
import EmptyState from '@/components/EmptyState'
|
||||
import Link from 'next/link'
|
||||
import { auth } from '@/auth'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export default async function Home() {
|
||||
const lists = await getLists()
|
||||
const session = await auth()
|
||||
|
||||
return (
|
||||
<main className="container mx-auto px-4 sm:px-6 py-6 sm:py-8 max-w-7xl">
|
||||
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6 sm:mb-8">
|
||||
<h1 className="text-2xl sm:text-3xl lg:text-4xl font-bold text-gray-900">Ultimate Lists</h1>
|
||||
<NewListButton />
|
||||
<div className="flex items-center gap-3">
|
||||
{session?.user && (
|
||||
<>
|
||||
<Link
|
||||
href="/invitations"
|
||||
className="px-3 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
Invitations
|
||||
</Link>
|
||||
<Link
|
||||
href="/profile"
|
||||
className="px-3 py-2 text-sm text-gray-700 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
Profile
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
<NewListButton />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Global Search */}
|
||||
|
||||
Reference in New Issue
Block a user