Skip to content

Commit

Permalink
removed unneccessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
1akhanBaheti committed Mar 7, 2024
1 parent 3044ff2 commit a463dff
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions web/components/project/create-project-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ export const CreateProjectModal: FC<Props> = observer((props) => {
onChange(alphanumericValue);
};

const handleLeadChange = (onChange: any, lead: string | null) => {
if (lead === getValues("project_lead")) onChange(null);
else onChange(lead);
};

return (
<Transition.Root show={isOpen} as={Fragment}>
<Dialog as="div" className="relative z-20" onClose={handleClose}>
Expand Down Expand Up @@ -412,7 +407,7 @@ export const CreateProjectModal: FC<Props> = observer((props) => {
<div className="h-7 flex-shrink-0" tabIndex={5}>
<MemberDropdown
value={value}
onChange={(lead) => handleLeadChange(onChange, lead)}
onChange={(lead) => onChange(lead === value ? null : lead)}
placeholder="Lead"
multiple={false}
buttonVariant="border-with-text"
Expand Down

0 comments on commit a463dff

Please sign in to comment.