import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Profile } from '@tencentcloud/chat'; import useContactInfo from './hooks/useContactInfo'; import { BasicInfo } from './basicInfo'; import { DivWithEdit } from '../../DivWithEdit'; interface Props { profile: Profile; } export function UnMemoizedAddFriendInfo( props: T, ): React.ReactElement { const { profile } = props; const { userID } = profile; const { t } = useTranslation(); const [isEditName, setIsEditRemark] = useState(''); const [remark, setRemark] = useState(''); const [wording, setWording] = useState(''); const [isSendedAdd, setIsSendAddFriend] = useState(false); const { addFriend, } = useContactInfo(); const handleSetEditRemark = () => { setIsEditRemark('remark'); }; const addFriendHandler = async () => { const options = { userID, remark, wording, }; await addFriend(options); setIsSendAddFriend(true); }; const editText = (data?:any) => { setRemark(data?.value); setIsEditRemark(''); }; const handleChange = (e) => { setWording(e.target.value); }; return ( <> {!isSendedAdd ? (

{t('TUIContact.Enter the verification info')}