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 <noreply@anthropic.com>
This commit is contained in:
nicktrn
2026-01-13 17:26:13 +00:00
committed by GitHub
parent 3be55db8f8
commit b042b0b2f9
@@ -94,7 +94,11 @@ const RegenerateApiKeyModalContent = ({ id, randomWord, title, closeModal }: Mod
Regenerate
</Button>
}
cancelButton={<Button variant={"tertiary/medium"}>Cancel</Button>}
cancelButton={
<Button variant={"tertiary/medium"} type="button" onClick={closeModal}>
Cancel
</Button>
}
/>
</Fieldset>
</fetcher.Form>