Made it so the listing of a corporate account shows the name of the corporate instead of the person

This commit is contained in:
Tiago Ribeiro
2023-11-27 13:07:33 +00:00
parent 81f5af5629
commit 3878d4761e
3 changed files with 11 additions and 3 deletions

View File

@@ -44,7 +44,11 @@ export default function AdminDashboard({user}: Props) {
className="flex w-full p-4 gap-4 items-center hover:bg-mti-purple-ultralight cursor-pointer transition ease-in-out duration-300">
<img src={displayUser.profilePicture} alt={displayUser.name} className="rounded-full w-10 h-10" />
<div className="flex flex-col gap-1 items-start">
<span>{displayUser.name}</span>
<span>
{displayUser.type === "corporate"
? displayUser.corporateInformation?.companyInformation?.name || displayUser.name
: displayUser.name}
</span>
<span className="text-sm opacity-75">{displayUser.email}</span>
</div>
</div>