From 6bc6a8f68c0a60a28e13f4878241f37bd5c3f386 Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:43:48 +0100 Subject: [PATCH] feat(profile): add "Share Profile" button and improve page responsiveness - Added "Share Profile" button with clipboard copy and success notification. - Enhanced responsiveness by adjusting avatar sizes, typography, and spacing. - Refined button styling for consistency and usability. --- .../app/(dashboard)/user/[username]/page.tsx | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/(dashboard)/user/[username]/page.tsx b/frontend/src/app/(dashboard)/user/[username]/page.tsx index 5e77a07..a77e263 100644 --- a/frontend/src/app/(dashboard)/user/[username]/page.tsx +++ b/frontend/src/app/(dashboard)/user/[username]/page.tsx @@ -1,9 +1,11 @@ "use client"; -import { Calendar, User as UserIcon } from "lucide-react"; +import { Calendar, Share2, User as UserIcon } from "lucide-react"; import * as React from "react"; +import { toast } from "sonner"; import { ContentList } from "@/components/content-list"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; +import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; import { ContentService } from "@/services/content.service"; import { UserService } from "@/services/user.service"; @@ -31,6 +33,12 @@ export default function PublicProfilePage({ [username], ); + const handleShareProfile = () => { + const url = `${window.location.origin}/user/${username}`; + navigator.clipboard.writeText(url); + toast.success("Lien du profil copié !"); + }; + if (loading) { return (
@{user.username}
+@{user.username}
+
{user.bio}
)}