import { KeenIcon } from '@/components'; import { Container } from '@/components/container'; import { IUserProfileHeroInfo, IUserProfileHeroProps } from './types'; import { toAbsoluteUrl } from '@/utils'; import { useSettings } from '@/providers'; const UserProfileHero = ({ image, name, info }: IUserProfileHeroProps) => { const { getThemeMode } = useSettings(); const buildInfo = (info: IUserProfileHeroInfo[]) => { return info.map((item, index) => { return (
{item.icon && } {item.email ? ( {item.email} ) : ( {item.label} )}
); }); }; const render = () => { return (
{image}
{name}
{buildInfo(info)}
); }; return render(); }; export { UserProfileHero };