feat: introduce singleton webhook URL

This commit is contained in:
Ali BARIN
2023-06-07 22:29:40 +00:00
parent 92638c2e97
commit de7a35dfe9
19 changed files with 285 additions and 78 deletions

View File

@@ -18,6 +18,7 @@ import type { IStep, ISubstep } from '@automatisch/types';
type TestSubstepProps = {
substep: ISubstep;
expanded?: boolean;
showWebhookUrl?: boolean;
onExpand: () => void;
onCollapse: () => void;
onChange?: ({ step }: { step: IStep }) => void;
@@ -52,6 +53,7 @@ function TestSubstep(props: TestSubstepProps): React.ReactElement {
onSubmit,
onContinue,
step,
showWebhookUrl = false,
} = props;
const formatMessage = useFormatMessage();
@@ -119,7 +121,7 @@ function TestSubstep(props: TestSubstepProps): React.ReactElement {
</Alert>
)}
{step.webhookUrl && (
{step.webhookUrl && showWebhookUrl && (
<WebhookUrlInfo webhookUrl={step.webhookUrl} sx={{ mb: 2 }} />
)}