Changed corporate from user.name to user.companyName

Company name is now updateable
This commit is contained in:
Joao Ramos
2023-12-14 17:57:39 +00:00
parent a2b9ba17a7
commit 44454d1e05
6 changed files with 17 additions and 15 deletions

View File

@@ -48,7 +48,7 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers,
const [referralAgent, setReferralAgent] = useState(user.type === "corporate" ? user.corporateInformation?.referralAgent : undefined);
const [companyName, setCompanyName] = useState(
user.type === "corporate"
? user.corporateInformation?.companyInformation.name
? user.corporateInformation?.companyInformation.companyName
: user.type === "agent"
? user.agentInformation.companyName
: undefined,