MyAutomations

Description#

This component renders the list of user's automations and a button to add a new one.

Import#

import { MyAutomations } from "@rollout/connect-react";

Usage#

Here's a basic usage example:

<MyAutomations
onCreateAutomation={() => navigate("create")}
onEditAutomation={(automation) => navigate(`${automation.id}/edit`)}
/>

Filtering#

Filtering automations is possible by specifying a predicate via the optional filter function property.

The example below will filter automations whose trigger.inputParams.form_id is 123.

<MyAutomations
onCreateAutomation={() => navigate("create")}
onEditAutomation={(automation) => navigate(`${automation.id}/edit`)}
filter={(automation) => automation.trigger.inputParams.form_id === "123"}
/>