import { User } from "@/services/userService"; import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; import { Badge } from "@/components/ui/badge"; import { Mail, User as UserIcon } from "lucide-react"; interface UserProfileDetailsProps { user: User; } export function UserProfileDetails({ user }: UserProfileDetailsProps) { // Format dates const createdDate = new Date(user.created).toLocaleDateString(); // Get avatar or initials const getInitials = () => { if (user.full_name) { return user.full_name.split(' ') .map(name => name[0]) .join('') .toUpperCase(); } return user.username[0].toUpperCase(); }; // Determine if the user is active based on the status field const isActive = user.status === "Active"; return (
Member since: {createdDate}