|
@@ -6,47 +6,46 @@ import IconCertificateColor from "@/components/icon/icon-certificate-color";
|
|
import { TAgentDetail } from '@/types/agent';
|
|
import { TAgentDetail } from '@/types/agent';
|
|
import { AvatarMedia } from '@/components/AvatarMedia';
|
|
import { AvatarMedia } from '@/components/AvatarMedia';
|
|
interface IProps {
|
|
interface IProps {
|
|
- size?: 'mini'|'large'
|
|
|
|
agent: TAgentDetail|null
|
|
agent: TAgentDetail|null
|
|
|
|
+ haveBg: boolean
|
|
}
|
|
}
|
|
-export default ({size='large', agent}:IProps) => {
|
|
|
|
-
|
|
|
|
|
|
+export default ({haveBg, agent}:IProps) => {
|
|
|
|
+ const nameStyle = haveBg ? 'text-white' : 'text-black'
|
|
|
|
+ const entStyle = haveBg ? 'text-white' : 'text-black-45'
|
|
const renderContent = () => {
|
|
const renderContent = () => {
|
|
- if(size === 'mini'){
|
|
|
|
return <>
|
|
return <>
|
|
<View className="rounded-full overflow-hidden w-28 h-28">
|
|
<View className="rounded-full overflow-hidden w-28 h-28">
|
|
<AvatarMedia source={agent?.avatarLogo || ''} className='w-28 h-28'></AvatarMedia>
|
|
<AvatarMedia source={agent?.avatarLogo || ''} className='w-28 h-28'></AvatarMedia>
|
|
</View>
|
|
</View>
|
|
<View className="flex flex-col flex-1 gap-4">
|
|
<View className="flex flex-col flex-1 gap-4">
|
|
<View className="flex items-center gap-4">
|
|
<View className="flex items-center gap-4">
|
|
- <View className="text-12 font-medium leading-12 text-white">{agent?.name}</View>
|
|
|
|
|
|
+ <View className={`text-12 font-medium leading-12 ${nameStyle}`}>{agent?.name}</View>
|
|
{agent?.isEnt && <View className="text-12 leading-12"><IconCertificateColor/></View>}
|
|
{agent?.isEnt && <View className="text-12 leading-12"><IconCertificateColor/></View>}
|
|
</View>
|
|
</View>
|
|
- {agent?.entId && <View className="flex items-center gap-2">
|
|
|
|
- <View className="text-12 leading-12 truncate max-w-[180px] text-white">
|
|
|
|
|
|
+ {agent?.entName && <View className="flex items-center gap-2">
|
|
|
|
+ <View className={`text-12 leading-12 truncate max-w-[180px] ${entStyle}`}>
|
|
{agent?.entName}
|
|
{agent?.entName}
|
|
</View>
|
|
</View>
|
|
</View>}
|
|
</View>}
|
|
</View>
|
|
</View>
|
|
</>
|
|
</>
|
|
- }
|
|
|
|
- return <>
|
|
|
|
- <View className="rounded-full overflow-hidden w-60 h-60">
|
|
|
|
- <AvatarMedia source={agent?.avatarLogo || ''} className='w-60 h-60'></AvatarMedia>
|
|
|
|
- </View>
|
|
|
|
- <View className="flex flex-col flex-1">
|
|
|
|
- <View className="flex items-end gap-8">
|
|
|
|
- <View className="text-24 font-medium leading-32">{agent?.name}</View>
|
|
|
|
- <View className="text-12 leading-20">{agent?.position}</View>
|
|
|
|
- </View>
|
|
|
|
- <View className="flex items-center gap-2">
|
|
|
|
- <View className="text-12 leading-20 truncate max-w-[188px]">
|
|
|
|
- {agent?.entName}
|
|
|
|
- </View>
|
|
|
|
- {agent?.isEnt && <TagCertificated />}
|
|
|
|
- </View>
|
|
|
|
- </View>
|
|
|
|
- </>
|
|
|
|
|
|
+ // return <>
|
|
|
|
+ // <View className="rounded-full overflow-hidden w-60 h-60">
|
|
|
|
+ // <AvatarMedia source={agent?.avatarLogo || ''} className='w-60 h-60'></AvatarMedia>
|
|
|
|
+ // </View>
|
|
|
|
+ // <View className="flex flex-col flex-1">
|
|
|
|
+ // <View className="flex items-end gap-8">
|
|
|
|
+ // <View className="text-24 font-medium leading-32">{agent?.name}</View>
|
|
|
|
+ // <View className="text-12 leading-20">{agent?.position}</View>
|
|
|
|
+ // </View>
|
|
|
|
+ // <View className="flex items-center gap-2">
|
|
|
|
+ // <View className="text-12 leading-20 truncate max-w-[188px]">
|
|
|
|
+ // {agent?.entName}
|
|
|
|
+ // </View>
|
|
|
|
+ // {agent?.isEnt && <TagCertificated />}
|
|
|
|
+ // </View>
|
|
|
|
+ // </View>
|
|
|
|
+ // </>
|
|
}
|
|
}
|
|
return (
|
|
return (
|
|
<View className="flex items-center gap-8">
|
|
<View className="flex items-center gap-8">
|