fix full name user if be null
This commit is contained in:
@@ -35,7 +35,7 @@ function TopBar({ profileDropState, toggleProfileDropState, toggleMenuState }: P
|
|||||||
const { data: notificationsCount } = useGetNotificationsCount();
|
const { data: notificationsCount } = useGetNotificationsCount();
|
||||||
const profileData = profile?.data;
|
const profileData = profile?.data;
|
||||||
const isLoggedIn = isSuccess && profileData;
|
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) => {
|
const handleNotificationClick = (e: React.MouseEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user