3272 add a page to create and edit webhook (#3859)

* Reorganize files

* Add new webhook form

* Reorganize files

* Add Webhook update

* Fix paths

* Code review returns
This commit is contained in:
martmull
2024-02-08 13:02:37 +01:00
committed by GitHub
parent ddc5165178
commit 00a46b21dc
21 changed files with 190 additions and 31 deletions

View File

@ -1,7 +1,7 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { ApiFieldItem } from '@/settings/developers/types/ApiFieldItem';
import { ApiFieldItem } from '@/settings/developers/types/api-key/ApiFieldItem';
import { IconChevronRight } from '@/ui/display/icon';
import { TableCell } from '@/ui/layout/table/components/TableCell';
import { TableRow } from '@/ui/layout/table/components/TableRow';

View File

@ -2,9 +2,8 @@ import React from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { WebhookFieldItem } from '@/settings/developers/types/WebhookFieldItem';
import { WebhookFieldItem } from '@/settings/developers/types/webhook/WebhookFieldItem';
import { IconChevronRight } from '@/ui/display/icon';
import { SoonPill } from '@/ui/display/pill/components/SoonPill';
import { TableCell } from '@/ui/layout/table/components/TableCell';
import { TableRow } from '@/ui/layout/table/components/TableRow';
@ -36,18 +35,14 @@ export const SettingsDevelopersWebhookTableRow = ({
}) => {
const theme = useTheme();
const soon = true; // Temporarily disabled while awaiting the development of the feature.
const onClickAction = !soon ? () => onClick() : undefined;
return (
<StyledApisFieldTableRow onClick={onClickAction}>
<StyledApisFieldTableRow onClick={onClick}>
<StyledUrlTableCell>{fieldItem.targetUrl}</StyledUrlTableCell>
<StyledIconTableCell>
<StyledIconChevronRight
size={theme.icon.size.md}
stroke={theme.icon.stroke.sm}
/>
{soon && <SoonPill />}
</StyledIconTableCell>
</StyledApisFieldTableRow>
);