Updated the code to name the field companyArabName and made it so it returns it when arabic
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user