"use client"; import { Avatar, Card, Button } from "flowbite-react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { Chip } from "../Chip/Chip"; export const ProfileUser = (props: { isOnline: boolean; avatar: string; login: string; status: string; socials: { isPrivate: boolean; hasSocials: boolean; socials: { name: string; nickname: any; icon: string; urlPrefix?: string | undefined; }[]; }; chips: { hasChips: boolean; isMyProfile: boolean; isVerified: boolean; isSponsor: boolean; isBlocked: boolean; roles?: { id: number; name: string; color: string; }[]; }; rating: number; }) => { const router = useRouter(); return ( {props.chips.hasChips && (
{props.chips.isMyProfile && ( )} {props.chips.isVerified && ( )} {props.chips.isSponsor && ( )} {props.chips.isBlocked && ( )} {props.chips.roles && props.chips.roles.length > 0 && props.chips.roles.map((role: any) => ( ))}
)}
{props.login}{" "} 0 ? "border-green-500 text-green-500" : "border-red-500 text-red-500" }`} > {props.rating}
{props.status}
{props.socials.hasSocials && !props.socials.isPrivate && (
{props.socials.socials .filter((social: any) => { if (social.nickname == "") { return false; } return true; }) .map((social: any) => { if (social.name == "discord" && social.nickname != "") return ( ); return ( ); })}
)}
); };