Skip to content

Commit

Permalink
move edit meta form save buttons to the end for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
nleroy917 committed Jan 11, 2024
1 parent 471fb7d commit f6f72fa
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions web/src/components/forms/edit-project-meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,25 +153,27 @@ export const ProjectMetaEditForm: FC<Props> = ({
)}
/>
</div>
<button
onClick={() => {
onCancel();
resetForm();
}}
type="button"
className="btn btn-outline-dark me-1"
>
Cancel
</button>
<button
onClick={() => mutation.mutate()}
id="metadata-save-btn"
disabled={(!isDirty && isValid) || mutation.isPending}
type="button"
className="btn btn-success me-1"
>
{mutation.isPending ? 'Saving...' : 'Save'}
</button>
<div className="d-flex flex-row align-items-center justify-content-end">
<button
onClick={() => {
onCancel();
resetForm();
}}
type="button"
className="btn btn-outline-dark me-1"
>
Cancel
</button>
<button
onClick={() => mutation.mutate()}
id="metadata-save-btn"
disabled={(!isDirty && isValid) || mutation.isPending}
type="button"
className="btn btn-success me-1"
>
{mutation.isPending ? 'Saving...' : 'Save'}
</button>
</div>
</form>
);
};

0 comments on commit f6f72fa

Please sign in to comment.