rename IServiceCreateEventPayload
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
1b613538cc
commit
0fea45c9f7
@@ -10,22 +10,20 @@ import { CheckCircle2Icon, CheckIcon, Loader2 } from 'lucide-react';
|
||||
|
||||
import type {
|
||||
IServiceClient,
|
||||
IServiceCreateEventPayload,
|
||||
IServiceEvent,
|
||||
IServiceProject,
|
||||
} from '@openpanel/db';
|
||||
|
||||
type Props = {
|
||||
project: IServiceProject;
|
||||
client: IServiceClient | null;
|
||||
events: IServiceCreateEventPayload[];
|
||||
events: IServiceEvent[];
|
||||
onVerified: (verified: boolean) => void;
|
||||
};
|
||||
|
||||
const VerifyListener = ({ client, events: _events, onVerified }: Props) => {
|
||||
const [events, setEvents] = useState<IServiceCreateEventPayload[]>(
|
||||
_events ?? []
|
||||
);
|
||||
useWS<IServiceCreateEventPayload>(
|
||||
const [events, setEvents] = useState<IServiceEvent[]>(_events ?? []);
|
||||
useWS<IServiceEvent>(
|
||||
`/live/events/${client?.projectId}?type=received`,
|
||||
(data) => {
|
||||
setEvents((prev) => [...prev, data]);
|
||||
|
||||
@@ -6,10 +6,7 @@ import { LinkButton } from '@/components/ui/button';
|
||||
import { cn } from '@/utils/cn';
|
||||
import Link from 'next/link';
|
||||
|
||||
import type {
|
||||
IServiceCreateEventPayload,
|
||||
IServiceProjectWithClients,
|
||||
} from '@openpanel/db';
|
||||
import type { IServiceEvent, IServiceProjectWithClients } from '@openpanel/db';
|
||||
|
||||
import OnboardingLayout, {
|
||||
OnboardingDescription,
|
||||
@@ -18,7 +15,7 @@ import VerifyListener from './onboarding-verify-listener';
|
||||
|
||||
type Props = {
|
||||
project: IServiceProjectWithClients;
|
||||
events: IServiceCreateEventPayload[];
|
||||
events: IServiceEvent[];
|
||||
};
|
||||
|
||||
const Verify = ({ project, events }: Props) => {
|
||||
|
||||
Reference in New Issue
Block a user