From 172850e13a83f0ee57225985b46ffda84b4ba1a4 Mon Sep 17 00:00:00 2001 From: Fringg Date: Wed, 13 May 2026 09:20:48 +0300 Subject: [PATCH] fix(profile): use displayName helper for name field Follow-up to displayName migration. Profile page still rendered `{user?.first_name} {user?.last_name}` directly, leaving a trailing space when last_name is null. displayName() handles the joining and fallback uniformly. --- src/pages/Profile.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index 953bc49..9da7cad 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -5,6 +5,7 @@ import { usePlatform } from '@/platform'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { motion, AnimatePresence } from 'framer-motion'; import { useAuthStore } from '../store/auth'; +import { displayName } from '../utils/displayName'; import { authApi } from '../api/auth'; import { isValidEmail } from '../utils/validation'; import { @@ -333,9 +334,7 @@ export default function Profile() { )}
{t('profile.name')} - - {user?.first_name} {user?.last_name} - + {displayName(user)}
{t('profile.registeredAt')}