Skip to content

Commit b042b0b

Browse files
nicktrnclaude
andauthored
fix(webapp): cancel button in API key regeneration modal (#2878)
The Cancel button was missing an onClick handler to close the modal dialog. This caused confusing behavior where clicking Cancel would not dismiss the dialog. Also added type="button" to prevent form submission since the button is inside a form. Co-authored-by: Claude <[email protected]>
1 parent 3be55db commit b042b0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/webapp/app/components/environments/RegenerateApiKeyModal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ const RegenerateApiKeyModalContent = ({ id, randomWord, title, closeModal }: Mod
9494
Regenerate
9595
</Button>
9696
}
97-
cancelButton={<Button variant={"tertiary/medium"}>Cancel</Button>}
97+
cancelButton={
98+
<Button variant={"tertiary/medium"} type="button" onClick={closeModal}>
99+
Cancel
100+
</Button>
101+
}
98102
/>
99103
</Fieldset>
100104
</fetcher.Form>

0 commit comments

Comments
 (0)