veza/apps/web/src/features/chat/components/IncomingCallModal.tsx
senke 6fad0ad68d fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle
- Fix 98 TypeScript errors across 37 files:
  - Service layer double-unwrapping (subscriptionService, distributionService, gearService)
  - Self-referencing variables in SearchPageResults
  - FeedView/ExploreView .posts→.items alignment
  - useQueueSync Zustand subscribe API
  - AdminAuditLogsView missing interface fields
  - Toast proxy type, interceptor type narrowing
  - 22 unused imports/variables removed
  - 5 storybook mock data fixes

- Align frontend API calls with backend endpoints:
  - Analytics: useAnalyticsView now calls /creator/analytics/dashboard (was /analytics)
  - Chat: chatService uses /conversations (was mock data), WS URL from backend token
  - Dashboard StatsSection: uses real /dashboard API data (was hardcoded zeros)
  - Settings: suppress 2FA toast error when endpoint unavailable

- Fix marketplace products: seed uses 'active' status (was 'published')
- Enrich seed: admin follows all creators (feed has content)

- Optimize bundle: vendor catch-all 793KB→318KB gzip (-60%)
  Split into vendor-charts, vendor-emoji, vendor-swagger, vendor-media, etc.

- Clean repo: remove ~100 orphaned screenshots, audit reports, logs from root

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:18:49 +01:00

57 lines
1.5 KiB
TypeScript

import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
import { Phone, PhoneOff } from 'lucide-react';
interface IncomingCallModalProps {
open: boolean;
callerName: string;
onAccept: () => void;
onReject: () => void;
}
export function IncomingCallModal({
open,
callerName,
onAccept,
onReject,
}: IncomingCallModalProps) {
return (
<Dialog open={open} onOpenChange={(o) => !o && onReject()}>
<DialogContent className="sm:max-w-md" onInteractOutside={onReject}>
<DialogHeader>
<DialogTitle>Appel entrant</DialogTitle>
</DialogHeader>
<div className="flex flex-col items-center gap-6 py-4">
<p className="text-muted-foreground">
{callerName} vous appelle
</p>
<div className="flex gap-4">
<Button
variant="default"
size="lg"
onClick={onAccept}
className="rounded-full h-14 w-14 p-0 bg-success hover:bg-success/90"
aria-label="Accepter"
>
<Phone className="h-6 w-6" />
</Button>
<Button
variant="destructive"
size="lg"
onClick={onReject}
className="rounded-full h-14 w-14 p-0"
aria-label="Refuser"
>
<PhoneOff className="h-6 w-6" />
</Button>
</div>
</div>
</DialogContent>
</Dialog>
);
}