improve timezone discovery
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { useState } from 'react';
|
||||
import { Participant } from '@/types/calendar';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { X, Plus, Search, User } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { X, Plus, Search, AlertCircle } from 'lucide-react';
|
||||
import { cn, getAvatarColor } from '@/lib/utils';
|
||||
|
||||
interface ParticipantSelectorProps {
|
||||
participants: Participant[];
|
||||
@@ -67,16 +67,20 @@ export const ParticipantSelector = ({
|
||||
onClick={() => addParticipant(participant)}
|
||||
className="w-full px-4 py-3 flex items-center gap-3 hover:bg-accent transition-colors text-left"
|
||||
>
|
||||
<div className="w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-xs font-medium text-primary">
|
||||
<div
|
||||
className="w-8 h-8 rounded-full flex items-center justify-center text-xs font-medium text-white"
|
||||
style={{ backgroundColor: getAvatarColor(participant.name) }}
|
||||
>
|
||||
{getInitials(participant.name)}
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-medium text-foreground">{participant.name}</div>
|
||||
<div className="text-xs text-muted-foreground">{participant.email}</div>
|
||||
</div>
|
||||
{!participant.connected && (
|
||||
<span className="ml-auto text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded">
|
||||
Not connected
|
||||
{!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>
|
||||
)}
|
||||
</button>
|
||||
@@ -96,10 +100,16 @@ export const ParticipantSelector = ({
|
||||
)}
|
||||
style={{ animationDelay: `${index * 50}ms` }}
|
||||
>
|
||||
<div className="w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center text-xs font-medium">
|
||||
<div
|
||||
className="w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium text-white"
|
||||
style={{ backgroundColor: getAvatarColor(participant.name) }}
|
||||
>
|
||||
{getInitials(participant.name)}
|
||||
</div>
|
||||
<span className="font-medium">{participant.name.split(' ')[0]}</span>
|
||||
{!participant.icsLink && (
|
||||
<AlertCircle className="w-3 h-3 text-amber-600" title="No calendar linked" />
|
||||
)}
|
||||
<button
|
||||
onClick={() => removeParticipant(participant.id)}
|
||||
className="w-5 h-5 rounded-full hover:bg-primary/20 flex items-center justify-center transition-colors"
|
||||
|
||||
Reference in New Issue
Block a user