fix full name user if be null

This commit is contained in:
hamid zarghami
2025-12-31 16:51:37 +03:30
parent 965af04109
commit 120afa5b8d
+1 -1
View File
@@ -35,7 +35,7 @@ function TopBar({ profileDropState, toggleProfileDropState, toggleMenuState }: P
const { data: notificationsCount } = useGetNotificationsCount();
const profileData = profile?.data;
const isLoggedIn = isSuccess && profileData;
const fullName = profileData ? `${profileData.firstName} ${profileData.lastName}`.trim() : 'کاربر داناک';
const fullName = profileData?.firstName ? `${profileData.firstName} ${profileData.lastName}`.trim() : `UDM-${profile?.data?.phone}`;
const handleNotificationClick = (e: React.MouseEvent) => {
e.preventDefault();