fix: test
This commit is contained in:
@@ -295,7 +295,10 @@ const { data: profile } = useGetMeQuery()
|
||||
|
||||
watch(profile, (user) => {
|
||||
if (!user) return
|
||||
const nameParts = String(user.name || '').trim().split(/\s+/).filter(Boolean)
|
||||
const nameParts = String(user.name || '')
|
||||
.trim()
|
||||
.split(/\s+/)
|
||||
.filter(Boolean)
|
||||
const firstName = user.firstName || nameParts[0] || ''
|
||||
const lastName = user.lastName || nameParts.slice(1).join(' ') || ''
|
||||
const phone = user.phone || user.phoneNumber || ''
|
||||
@@ -309,9 +312,9 @@ watch(profile, (user) => {
|
||||
gender: user.profile?.gender || '',
|
||||
bio: user.profile?.bio || '',
|
||||
phoneNumber: phone,
|
||||
provinceId: user.address?.province?.id || '',
|
||||
cityId: user.address?.city?.id || '',
|
||||
address: user.address?.address || '',
|
||||
provinceId: user?.province?.id || '',
|
||||
cityId: user?.city?.id || '',
|
||||
address: user?.address || '',
|
||||
avatarId: user.profile?.avatarId || null,
|
||||
}
|
||||
initialNationalCode.value = user.nationalCode || ''
|
||||
|
||||
Reference in New Issue
Block a user