aztea-react
v0.2.0
Published
React provider, hook and Connect button for AgentWeb
Readme
aztea-react
Use AgentWebProvider, useAgentWebConnect, or ConnectButton in an existing
React product. createConnectSession must call your backend; an AgentWeb API key
must never be bundled into the browser.
<AgentWebProvider createConnectSession={(input) =>
fetch('/api/agentweb/connect', { method: 'POST', body: JSON.stringify(input) })
.then((response) => response.json())
}>
<ConnectButton
integrationId="amazon"
endUserId={currentUser.id}
returnUrl={`${location.origin}/settings/connections`}
/>
</AgentWebProvider>