From 5e67cb62aceb5204407551e38158ed8264bec03c Mon Sep 17 00:00:00 2001 From: Aman-Meenia Date: Sun, 10 Nov 2024 22:22:43 +0530 Subject: [PATCH] Add group chat --- src/components/displaySearchUser/DisplaySearchUserInfo.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/displaySearchUser/DisplaySearchUserInfo.tsx b/src/components/displaySearchUser/DisplaySearchUserInfo.tsx index be277a4..b361dc6 100644 --- a/src/components/displaySearchUser/DisplaySearchUserInfo.tsx +++ b/src/components/displaySearchUser/DisplaySearchUserInfo.tsx @@ -254,8 +254,9 @@ export default function DisplaySearchUserInfo() { } }; - const getInitials = (username: string) => { + const getInitials = (username: string | undefined) => { if (!username) return ""; + return username .split(" ") .map((name) => name[0])