diff --git a/apps/dashboard/src/components/clients/create-client-success.tsx b/apps/dashboard/src/components/clients/create-client-success.tsx
index 639089ac..09edaba8 100644
--- a/apps/dashboard/src/components/clients/create-client-success.tsx
+++ b/apps/dashboard/src/components/clients/create-client-success.tsx
@@ -4,30 +4,19 @@ import { RocketIcon } from 'lucide-react';
import type { IServiceClient } from '@openpanel/db';
import CopyInput from '../forms/copy-input';
-import { Label } from '../ui/label';
type Props = IServiceClient;
-export function CreateClientSuccess({ id, secret, cors }: Props) {
+export function CreateClientSuccess({ id, secret }: Props) {
return (
{secret && (
- {cors && (
-
- You will only need the secret if you want to send server events.
-
- )}
-
- )}
- {cors && (
-
-
-
- {cors}
-
+
+ You will only need the secret if you want to send server events.
+
)}
diff --git a/apps/dashboard/src/modals/AddClient.tsx b/apps/dashboard/src/modals/AddClient.tsx
index 275215e5..7f486093 100644
--- a/apps/dashboard/src/modals/AddClient.tsx
+++ b/apps/dashboard/src/modals/AddClient.tsx
@@ -1,22 +1,17 @@
'use client';
-import AnimateHeight from '@/components/animate-height';
import { CreateClientSuccess } from '@/components/clients/create-client-success';
-import TagInput from '@/components/forms/tag-input';
import { Button, buttonVariants } from '@/components/ui/button';
-import { CheckboxInput } from '@/components/ui/checkbox';
import { Combobox } from '@/components/ui/combobox';
import { DialogFooter } from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
-import { Switch } from '@/components/ui/switch';
import { useAppParams } from '@/hooks/useAppParams';
import { api, handleError } from '@/trpc/client';
import { cn } from '@/utils/cn';
import { zodResolver } from '@hookform/resolvers/zod';
import { SaveIcon } from 'lucide-react';
import { useRouter } from 'next/navigation';
-import { useState } from 'react';
import type { SubmitHandler } from 'react-hook-form';
import { Controller, useForm } from 'react-hook-form';
import { toast } from 'sonner';
diff --git a/apps/dashboard/src/modals/EditClient.tsx b/apps/dashboard/src/modals/EditClient.tsx
index 2981e2bb..b41d04ab 100644
--- a/apps/dashboard/src/modals/EditClient.tsx
+++ b/apps/dashboard/src/modals/EditClient.tsx
@@ -1,12 +1,10 @@
import { ButtonContainer } from '@/components/button-container';
-import { InputWithLabel, WithLabel } from '@/components/forms/input-with-label';
-import TagInput from '@/components/forms/tag-input';
+import { InputWithLabel } from '@/components/forms/input-with-label';
import { Button } from '@/components/ui/button';
-import { CheckboxInput } from '@/components/ui/checkbox';
import { api, handleError } from '@/trpc/client';
import { zodResolver } from '@hookform/resolvers/zod';
import { useRouter } from 'next/navigation';
-import { Controller, useForm } from 'react-hook-form';
+import { useForm } from 'react-hook-form';
import { toast } from 'sonner';
import { z } from 'zod';
@@ -20,18 +18,11 @@ type EditClientProps = IServiceClient;
const validator = z.object({
id: z.string().min(1),
name: z.string().min(1),
- cors: z.string().nullable(),
- crossDomain: z.boolean().optional(),
});
type IForm = z.infer;
-export default function EditClient({
- id,
- name,
- cors,
- crossDomain,
-}: EditClientProps) {
+export default function EditClient({ id, name }: EditClientProps) {
const router = useRouter();
const { register, handleSubmit, reset, formState, control, setError } =
useForm({
@@ -39,8 +30,6 @@ export default function EditClient({
defaultValues: {
id,
name,
- cors,
- crossDomain,
},
});
@@ -59,81 +48,8 @@ export default function EditClient({
return (
-