mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-28 21:18:57 +00:00
Only open the dialog when the integration answers with a modal
A `block` output would render loose next to the button, and a `complete` means the integration handled the click without any UI. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,9 @@ export function IntegrationActionButton(props: {
|
||||
};
|
||||
|
||||
const result = await renderIntegrationUi({ renderContext, request: input });
|
||||
if (result.output?.type === 'element') {
|
||||
// Anything but a modal has no place to go here: a `block` would render loose next to
|
||||
// the button, and a `complete` means the integration handled the click on its own.
|
||||
if (result.output?.type === 'element' && result.output.element.type === 'modal') {
|
||||
setModal({ input, output: result.output, children: result.children });
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user