Skip to content

Commit

Permalink
Merge pull request #99 from AkshataKatwal16/admin
Browse files Browse the repository at this point in the history
Issue #PS-1497 feat: resolve lint error
  • Loading branch information
itsvick authored Aug 5, 2024
2 parents 35b94ff + ff8699f commit ba13679
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/components/CommonUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,15 @@ const CommonUserModal: React.FC<UserModalProps> = ({
const formData = data.formData;
console.log("Form data submitted:", formData);
const schemaProperties = schema.properties;

const { username, password } = generateUsernameAndPassword(
selectedStateCode,
userType,
);
const result = generateUsernameAndPassword(selectedStateCode, userType);
if (result !== null) {
const { username, password } = result;
// You can now use username and password safely here

// const { username, password } = generateUsernameAndPassword(
// selectedStateCode,
// userType
// );

let apiBody: any = {
username: username,
Expand Down Expand Up @@ -286,7 +290,7 @@ const CommonUserModal: React.FC<UserModalProps> = ({
onClose();
console.log(error);
}
};
}};

const handleChange = (event: IChangeEvent<any>) => {
console.log("Form data changed:", event.formData);
Expand Down
2 changes: 1 addition & 1 deletion src/components/DynamicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const DynamicForm: React.FC<DynamicFormProps> = ({
children,
}) => {
console.log(formData);
const widgets = {
const widgets: any = {
MultiSelectCheckboxes: MultiSelectCheckboxes,
CustomRadioWidget: CustomRadioWidget,
};
Expand Down

0 comments on commit ba13679

Please sign in to comment.