diff --git a/src/components/DemographicInformationInput.tsx b/src/components/DemographicInformationInput.tsx index 1f90ff21..222dc546 100644 --- a/src/components/DemographicInformationInput.tsx +++ b/src/components/DemographicInformationInput.tsx @@ -24,7 +24,7 @@ export default function DemographicInformationInput({user, mutateUser}: Props) { const [position, setPosition] = useState(); const [isLoading, setIsLoading] = useState(false); - const [corporateName, setCorporateName] = useState(); + const [companyName, setCompanyName] = useState(); const [commercialRegistration, setCommercialRegistration] = useState(); const save = (e?: FormEvent) => { @@ -40,7 +40,7 @@ export default function DemographicInformationInput({user, mutateUser}: Props) { employment: user.type === "corporate" ? undefined : employment, position: user.type === "corporate" ? position : undefined, }, - agentInformation: user.type === "agent" ? {corporateName, commercialRegistration} : undefined, + agentInformation: user.type === "agent" ? {companyName, commercialRegistration} : undefined, }) .then((response) => mutateUser((response.data as {user: User}).user)) .catch(() => { @@ -62,7 +62,7 @@ export default function DemographicInformationInput({user, mutateUser}: Props) {
{user.type === "agent" && (
- + {!isLoading && "Save information"} {isLoading && ( diff --git a/src/components/UserCard.tsx b/src/components/UserCard.tsx index f81302ac..682b32d8 100644 --- a/src/components/UserCard.tsx +++ b/src/components/UserCard.tsx @@ -146,11 +146,11 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers, <>
@@ -159,7 +159,7 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers, type="text" name="commercialRegistration" onChange={setCommercialRegistration} - placeholder="Enter commercial registration" + placeholder="Enter company name" defaultValue={commercialRegistration} required /> @@ -171,11 +171,11 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers, <>
null} - placeholder="Enter corporate name" + placeholder="Enter company name" defaultValue={user.agentInformation.companyName} disabled /> @@ -227,7 +227,7 @@ export default function Home() { type="text" name="commercialRegistration" onChange={() => null} - placeholder="Enter commercial registration" + placeholder="Enter company name" defaultValue={user.agentInformation.commercialRegistration} disabled />