From 7dce7ec2865afef3040e603a8670cbb47c5a04a3 Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:43:34 +0100 Subject: [PATCH] feat(profile): add profile sharing feature and enhance UI responsiveness - Implemented the "Share Profile" button with clipboard copy functionality and success notification. - Improved profile page responsiveness by adjusting avatar, text sizes, and spacing. - Added consistent button styling and updated tabs for better usability and design. --- frontend/src/app/(dashboard)/profile/page.tsx | 68 +++++++++++++------ 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/frontend/src/app/(dashboard)/profile/page.tsx b/frontend/src/app/(dashboard)/profile/page.tsx index daf04fb..562e669 100644 --- a/frontend/src/app/(dashboard)/profile/page.tsx +++ b/frontend/src/app/(dashboard)/profile/page.tsx @@ -1,6 +1,13 @@ "use client"; -import { Calendar, Camera, LogIn, LogOut, Settings } from "lucide-react"; +import { + Calendar, + Camera, + LogIn, + LogOut, + Settings, + Share2, +} from "lucide-react"; import Link from "next/link"; import { useSearchParams } from "next/navigation"; import * as React from "react"; @@ -59,6 +66,12 @@ export default function ProfilePage() { [], ); + const handleShareProfile = () => { + const url = `${window.location.origin}/user/${user?.username}`; + navigator.clipboard.writeText(url); + toast.success("Lien du profil copié !"); + }; + if (isLoading) { return (
@@ -93,12 +106,12 @@ export default function ProfilePage() { return (
-
-
-
- +
+
+
+ - + {user.username.slice(0, 2).toUpperCase()} @@ -106,8 +119,9 @@ export default function ProfilePage() { type="button" onClick={handleAvatarClick} className="absolute inset-0 flex items-center justify-center bg-black/40 text-white rounded-full opacity-0 group-hover:opacity-100 transition-opacity" + title="Changer l'avatar" > - +
-
-

+
+

{user.displayName || user.username}

-

@{user.username}

+

@{user.username}

+ {user.bio && ( -

{user.bio}

+

+ {user.bio} +

)} +
- + Membre depuis{" "} {new Date(user.createdAt).toLocaleDateString("fr-FR", { @@ -137,18 +155,28 @@ export default function ProfilePage() { })}
-
- +
- - + + Mes Mèmes - + Mes Favoris - + - +