Updated the code to name the field companyArabName and made it so it returns it when arabic

This commit is contained in:
Tiago Ribeiro
2024-04-21 00:37:08 +01:00
parent a958e2ff0d
commit 1a17689cd2
5 changed files with 80 additions and 51 deletions

View File

@@ -106,7 +106,7 @@ const UserCard = ({
: undefined,
);
const [arabName, setArabName] = useState(
user.type === "agent" ? user.agentInformation?.arabName : undefined,
user.type === "agent" ? user.agentInformation?.companyArabName : undefined,
);
const [commercialRegistration, setCommercialRegistration] = useState(
user.type === "agent"
@@ -236,21 +236,21 @@ const UserCard = ({
<>
<div className="grid grid-cols-1 md:grid-cols-3 gap-8 w-full">
<Input
label="Arab Name"
label="Company Name (Arabic)"
type="text"
name="arabName"
onChange={setArabName}
placeholder="Enter their arab name"
placeholder="Enter their company's name in arabic"
defaultValue={arabName}
required
disabled={disabled}
/>
<Input
label="Company Name"
label="Company Name (English)"
type="text"
name="companyName"
onChange={setCompanyName}
placeholder="Enter their company's name"
placeholder="Enter their company's name in english"
defaultValue={companyName}
required
disabled={disabled}