diff --git a/packages/engine-frontend/components/AGConnectionPortal.tsx b/packages/engine-frontend/components/AGConnectionPortal.tsx index 078eafe2..e2bd8919 100644 --- a/packages/engine-frontend/components/AGConnectionPortal.tsx +++ b/packages/engine-frontend/components/AGConnectionPortal.tsx @@ -45,10 +45,14 @@ const AGConnectionPortalComponent: React.FC = ({ // const iframe = document.getElementById('openint-connect-iframeId'); // iframe?.contentWindow.postMessage({type: 'triggerConnectDialog', value: true },'*'); - const handleMessage = React.useCallback((event: MessageEvent) => { + const handleMessage = React.useCallback(async (event: MessageEvent) => { if (event.data.type === 'triggerConnectDialog') { console.log('triggerConnectDialog', event.data.value) - setOpenDialog(event.data.value) + if(event.data.value) { + await listConnectionsRes.refetch().then(() => { + setOpenDialog(event.data.value) + }) + } } }, []) @@ -135,11 +139,8 @@ const AGConnectionPortalComponent: React.FC = ({ connectorConfigFilters={{verticalKey: category.key}} open={openDialog} setOpen={setOpenDialog} - onEvent={(event) => { - if (event.type === 'close') { - listConnectionsRes.refetch(); // Trigger refetch - } - }} + // trigger refetch of connections + onEvent={() => listConnectionsRes.refetch()} /> )} diff --git a/packages/engine-frontend/components/ConnectDialog.tsx b/packages/engine-frontend/components/ConnectDialog.tsx index cc66e522..ed977be4 100644 --- a/packages/engine-frontend/components/ConnectDialog.tsx +++ b/packages/engine-frontend/components/ConnectDialog.tsx @@ -51,10 +51,19 @@ export function ConnectDialog({ const [first, ...rest] = filteredCcfgs if (!first) { return ( -
- No connectors configured for {categoryKey}. Please check your - settings -
+ {}}> + + + No Integrations Available + + You have no further integrations available. If you believe this is an error, please contact support. + + + + + + + ) } const category = categoryKey ? VERTICAL_BY_KEY[categoryKey] : undefined