Skip to content

Commit

Permalink
removed unnecessary conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
kihan2518B committed Nov 5, 2024
1 parent f40317d commit cbea55e
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,15 @@ const Form = <T extends FormDetails>({
label={props.submitLabel}
/>
{props.additionalButtons?.map((btn) => {
if (btn.label) {
return (
<Submit
id={btn.id}
type={btn.type}
disabled={disabled || !isDirty}
label={btn.label}
/>
);
}
return (
<Submit
key={btn.id}
id={btn.id}
type={btn.type}
disabled={disabled || !isDirty}
label={btn.label}
/>
);
})}
</div>
</Provider>
Expand Down

0 comments on commit cbea55e

Please sign in to comment.