import React from 'react' import map from 'lodash/map' import { SportTypes } from 'config' import { Gender } from 'requests' import { SportName } from 'features/Common' import { useItemsList } from './hooks' import { Logo, LogoWrapper, Item, ItemInfo, Name, StyledLink, TeamOrCountry, Wrapper, GenderComponent, } from './styled' type SearchItemsListProps = { close: () => void, list: Array<{ color: string, fallbackImage: string, gender?: Gender, id: number, logo: string, name: string, profileUrl: string, sportType: SportTypes, teamOrCountry?: string, }>, } export const ItemsList = ({ close, list }: SearchItemsListProps) => { const { onError, ref, } = useItemsList() return ( {map(list, ({ fallbackImage, gender, id, logo, name, profileUrl, sportType, teamOrCountry, }) => ( {name} {teamOrCountry} {gender && } ))} ) }