chore: more clean up + ts issues

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-11 21:50:51 +01:00
parent 3205ea0a31
commit cfd7fd9c5e
7 changed files with 12 additions and 233 deletions

View File

@@ -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 (
<div className="grid gap-4">
<CopyInput label="Client ID" value={id} />
{secret && (
<div className="w-full">
<CopyInput label="Secret" value={secret} />
{cors && (
<p className="mt-1 text-sm text-muted-foreground">
You will only need the secret if you want to send server events.
</p>
)}
</div>
)}
{cors && (
<div className="text-left">
<Label>CORS settings</Label>
<div className="font-mono flex items-center justify-between rounded border-input bg-def-200 p-2 px-3 ">
{cors}
</div>
<p className="mt-1 text-sm text-muted-foreground">
You will only need the secret if you want to send server events.
</p>
</div>
)}
<Alert>