embed-react/src/hooks
directory. These hooks are useful
useEmbeddedProjectQuery
projectId
(string
): The ID of the project to fetch.isLoading (boolean)
: Indicates if the data is still loading.error (ApiError | undefined)
: Error object if the request fails.project (Project | undefined)
: The fetched project details.connectionTemplates (ConnectionTemplate[])
: List of connection templates for the project.useDisconnectActivation
onDisconnectIntegration ((integrationId: string) => Promise<void>)
: Function to disconnect an integration by its ID.usePageSelectedState
state ({ projectId: string; method: string } | null)
: The current selected state.onOpenChange ((open: boolean) => void)
: Function to toggle the open state.onConnectClick ((projectId: string) => void)
: Function to handle the connect button click.onManageClick ((projectId: string) => void)
: Function to handle the manage button click.useEmbeddedIntegrationPageQuery
params
({ deployed?: boolean }
): Optional parameters to filter projects. If true, then only deployed projects are fetched. Returns all projects if not specified or false.isLoading (boolean)
: Indicates if the data is still loading.error (ApiError | undefined)
: Error object if the request fails.projects (UserProjectSummary[])
: List of user project summaries. This includes the project along with an isActivated
booelean indicating if the user is activated on the project.refresh (() => void)
: Function to refresh the data.