fix(web): adjust the value of End User Name

This commit is contained in:
zhaoying
2026-04-14 16:06:03 +08:00
parent b5ec5c2cea
commit fa1e5ee43c
3 changed files with 12 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 18:33:30
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-27 11:11:09
* @Last Modified time: 2026-04-14 16:03:41
*/
/**
* End User Profile Component
@@ -27,11 +27,11 @@ import type { EndUser, EndUserProfileModalRef, EndUserProfileRef } from '../type
* Component props
*/
interface EndUserProfileProps {
onDataLoaded?: (data: { other_name?: string; id: string }) => void;
onDataLoaded?: (data?: EndUser) => void;
className?: string;
}
const EndUserProfile = forwardRef<EndUserProfileRef, EndUserProfileProps>(({ className }, ref) => {
const EndUserProfile = forwardRef<EndUserProfileRef, EndUserProfileProps>(({ className, onDataLoaded }, ref) => {
const { t } = useTranslation()
const { id } = useParams()
const endUserProfileModalRef = useRef<EndUserProfileModalRef>(null)
@@ -51,6 +51,7 @@ const EndUserProfile = forwardRef<EndUserProfileRef, EndUserProfileProps>(({ cla
const userData = res as EndUser
setData(userData)
setLoading(false)
onDataLoaded?.(userData as EndUser)
})
.finally(() => {
setLoading(false)