misc: addressed review comments

This commit is contained in:
Sheen Capadngan
2024-07-04 13:33:32 +08:00
parent f7626d03bf
commit cb664bb042
7 changed files with 77 additions and 119 deletions
+7
View File
@@ -1,5 +1,11 @@
export enum WebhookType {
GENERAL = "general",
SLACK = "slack"
}
export type TWebhook = {
id: string;
type: WebhookType;
projectId: string;
environment: {
slug: string;
@@ -22,6 +28,7 @@ export type TCreateWebhookDto = {
webhookUrl: string;
webhookSecretKey?: string;
secretPath: string;
type: WebhookType;
};
export type TUpdateWebhookDto = {
@@ -14,11 +14,7 @@ import {
SelectItem
} from "@app/components/v2";
import { SecretPathInput } from "@app/components/v2/SecretPathInput";
enum WebhookType {
GENERAL = "general",
SLACK = "slack"
}
import { WebhookType } from "@app/hooks/api/webhooks/types";
const formSchema = z
.object({
@@ -116,7 +112,6 @@ export const AddWebhookForm = ({
<Controller
control={control}
name="type"
defaultValue={WebhookType.GENERAL}
render={({ field: { onChange, ...field }, fieldState: { error } }) => (
<FormControl
label="Type"