mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import * as React from 'react';
|
|
|
|
import { WebhookPages } from './WebhooksSiteSettingsP';
|
|
import Box from '../../common/Box';
|
|
import { IWebhook } from '../../../interfaces/IWebhook';
|
|
import WebhookForm, { ISiteSettingsWebhookFormUpdate } from './WebhookForm';
|
|
|
|
interface Props {
|
|
isSubmitting: boolean;
|
|
submitError: string;
|
|
|
|
handleSubmitWebhook(webhook: IWebhook): void;
|
|
handleUpdateWebhook(id: number, form: ISiteSettingsWebhookFormUpdate): void;
|
|
|
|
selectedWebhook: IWebhook;
|
|
page: WebhookPages;
|
|
setPage: React.Dispatch<React.SetStateAction<WebhookPages>>;
|
|
|
|
authenticityToken: string;
|
|
}
|
|
|
|
const WebhookFormPage = ({
|
|
isSubmitting,
|
|
submitError,
|
|
handleSubmitWebhook,
|
|
handleUpdateWebhook,
|
|
selectedWebhook,
|
|
page,
|
|
setPage,
|
|
authenticityToken,
|
|
}: Props) => (
|
|
<>
|
|
<Box customClass="webhookFormPage">
|
|
<WebhookForm
|
|
isSubmitting={isSubmitting}
|
|
submitError={submitError}
|
|
handleSubmitWebhook={handleSubmitWebhook}
|
|
handleUpdateWebhook={handleUpdateWebhook}
|
|
selectedWebhook={selectedWebhook}
|
|
page={page}
|
|
setPage={setPage}
|
|
authenticityToken={authenticityToken}
|
|
/>
|
|
</Box>
|
|
</>
|
|
);
|
|
|
|
export default WebhookFormPage; |