diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx index 2c18ce2..de0d100 100644 --- a/src/app/profile/page.tsx +++ b/src/app/profile/page.tsx @@ -3,6 +3,7 @@ import { redirect } from 'next/navigation'; import { getUserById } from '@/services/auth'; import { ProfileForm } from './ProfileForm'; import { PasswordForm } from './PasswordForm'; +import { getGravatarUrl } from '@/lib/gravatar'; export default async function ProfilePage() { const session = await auth(); @@ -19,17 +20,36 @@ export default async function ProfilePage() { return (
-
-

Mon Profil

-

Gérez vos informations personnelles

+
+ {user.name +
+

Mon Profil

+

Gérez vos informations personnelles

+
{/* Profile Info */}
-

- Informations personnelles -

+
+

+ Informations personnelles +

+ + Changer mon avatar sur Gravatar → + +
0 && (
{shares.slice(0, 3).map((share) => ( -
- {share.user.name?.[0]?.toUpperCase() || share.user.email[0].toUpperCase()} -
+ email={share.user.email} + name={share.user.name} + size={32} + className="border-2 border-card" + /> ))} {shares.length > 3 && (
diff --git a/src/components/collaboration/ShareModal.tsx b/src/components/collaboration/ShareModal.tsx index 45eeed5..5dd9e2a 100644 --- a/src/components/collaboration/ShareModal.tsx +++ b/src/components/collaboration/ShareModal.tsx @@ -5,6 +5,7 @@ import { Modal } from '@/components/ui/Modal'; import { Input } from '@/components/ui/Input'; import { Button } from '@/components/ui/Button'; import { Badge } from '@/components/ui/Badge'; +import { Avatar } from '@/components/ui/Avatar'; import { shareSessionAction, removeShareAction } from '@/actions/share'; import type { ShareRole } from '@prisma/client'; @@ -120,9 +121,7 @@ export function ShareModal({ className="flex items-center justify-between rounded-lg border border-border bg-card p-3" >
-
- {share.user.name?.[0]?.toUpperCase() || share.user.email[0].toUpperCase()} -
+

{share.user.name || share.user.email} diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index e7b6e2d..958be8b 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -5,6 +5,7 @@ import { usePathname } from 'next/navigation'; import { useSession, signOut } from 'next-auth/react'; import { useTheme } from '@/contexts/ThemeContext'; import { useState } from 'react'; +import { Avatar } from '@/components/ui'; export function Header() { const { theme, toggleTheme } = useTheme(); @@ -109,8 +110,13 @@ export function Header() {