From 4e447cade4ce3b7d91ee7937161eaab3111a9733 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Tue, 10 Mar 2026 15:05:36 +0100 Subject: [PATCH] feat: enhance UserAvatar component to accept FacehashProps and add WhatsApp link in UsersTable context menu --- .../src/components/facehash/facehash.tsx | 2 +- .../src/components/tables/users-table.tsx | 22 +++++++++++++- .../src/components/user_avatar.tsx | 29 ++++++++++++------- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/apps/infoalloggi/src/components/facehash/facehash.tsx b/apps/infoalloggi/src/components/facehash/facehash.tsx index 1241aa2..baaba81 100644 --- a/apps/infoalloggi/src/components/facehash/facehash.tsx +++ b/apps/infoalloggi/src/components/facehash/facehash.tsx @@ -7,7 +7,7 @@ import { FACES } from "./faces"; type Intensity3D = "none" | "subtle" | "medium" | "dramatic"; type Variant = "gradient" | "solid"; -interface FacehashProps +export interface FacehashProps extends Omit, "children"> { /** * String to generate a deterministic face from. diff --git a/apps/infoalloggi/src/components/tables/users-table.tsx b/apps/infoalloggi/src/components/tables/users-table.tsx index d08a7c4..53676ed 100644 --- a/apps/infoalloggi/src/components/tables/users-table.tsx +++ b/apps/infoalloggi/src/components/tables/users-table.tsx @@ -22,9 +22,11 @@ import { UserAvatar } from "~/components/user_avatar"; import { cn } from "~/lib/utils"; import type { Users } from "~/schemas/public/Users"; import { api } from "~/utils/api"; +import { WhatsAppIcon2 } from "../svgs"; import { ContextMenuContent, ContextMenuItem, + ContextMenuLabel, ContextMenuSeparator, } from "../ui/context-menu"; @@ -209,6 +211,15 @@ export const UsersTable = (props: { data: UserWChatInfo[] }) => { columns_titles={columns_titles} contextMenuContent={(data) => ( + + + {data.username} + { Chat + + + + WhatsApp + +