update
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
import { useState, useRef, useCallback, useEffect } from 'react';
|
||||
import { Participant } from '@/types/calendar';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { X, Plus, Search, AlertCircle } from 'lucide-react';
|
||||
import { cn, getAvatarColor } from '@/lib/utils';
|
||||
import { X, Plus, Search, AlertCircle, Info } from 'lucide-react';
|
||||
import { cn, getAvatarColor, getCalendarNameFromUrl } from '@/lib/utils';
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '@/components/ui/tooltip';
|
||||
|
||||
interface ParticipantSelectorProps {
|
||||
participants: Participant[];
|
||||
@@ -126,12 +132,28 @@ export const ParticipantSelector = ({
|
||||
<div className="font-medium text-foreground">{participant.name}</div>
|
||||
<div className="text-xs text-muted-foreground">{participant.email}</div>
|
||||
</div>
|
||||
{!participant.icsLink && (
|
||||
<span className="ml-auto text-xs text-amber-600 flex items-center gap-1">
|
||||
<AlertCircle className="w-3 h-3" />
|
||||
No calendar
|
||||
</span>
|
||||
)}
|
||||
<span className="ml-auto text-xs flex items-center gap-1">
|
||||
{participant.icsLink ? (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span className="text-muted-foreground cursor-help flex items-center gap-1">
|
||||
📅 {getCalendarNameFromUrl(participant.icsLink) || 'Calendar'}
|
||||
<Info className="w-3 h-3 opacity-50" />
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="left" className="max-w-[220px]">
|
||||
<p>Availability is based on this calendar only. Other calendars on the same account are not included.</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
) : (
|
||||
<span className="text-amber-600 flex items-center gap-1">
|
||||
<AlertCircle className="w-3 h-3" />
|
||||
No calendar
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user