Ott 335 img alt name (#126)

* fix(ott-394): deleted search box target blank

* fix(ott-335): deleted search alt name

* fix(ott-335): minor bug fix
keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Armen 5 years ago committed by GitHub
parent 3169729207
commit 988a0142a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/features/ItemsList/index.tsx
  2. 2
      src/features/Modal/index.tsx
  3. 6
      src/features/Search/index.tsx

@ -17,6 +17,7 @@ import {
} from './styled' } from './styled'
type SearchItemsListProps = { type SearchItemsListProps = {
close: () => void,
list: Array<{ list: Array<{
color: string, color: string,
fallbackImage: string, fallbackImage: string,
@ -29,7 +30,7 @@ type SearchItemsListProps = {
}>, }>,
} }
export const ItemsList = ({ list }: SearchItemsListProps) => { export const ItemsList = ({ close, list }: SearchItemsListProps) => {
const { const {
onError, onError,
ref, ref,
@ -48,12 +49,11 @@ export const ItemsList = ({ list }: SearchItemsListProps) => {
teamOrCountry, teamOrCountry,
}) => ( }) => (
<Item key={id}> <Item key={id}>
<StyledLink to={profileUrl} target='_blank'> <StyledLink to={profileUrl} onClick={close}>
<LogoWrapper> <LogoWrapper>
<Logo <Logo
data-src={logo} data-src={logo}
onError={onError(fallbackImage)} onError={onError(fallbackImage)}
alt={name}
/> />
</LogoWrapper> </LogoWrapper>
<ItemInfo> <ItemInfo>

@ -13,7 +13,7 @@ import {
type TModalProps = { type TModalProps = {
children: ReactNode, children: ReactNode,
close: ()=> void, close: () => void,
isOpen: boolean, isOpen: boolean,
} }

@ -45,21 +45,21 @@ export const Search = () => {
{!isEmpty(tournaments) && ( {!isEmpty(tournaments) && (
<Fragment> <Fragment>
<Header title='tournament' image='tournament' /> <Header title='tournament' image='tournament' />
<ItemsList list={tournaments} /> <ItemsList list={tournaments} close={close} />
</Fragment> </Fragment>
)} )}
{!isEmpty(teams) && ( {!isEmpty(teams) && (
<Fragment> <Fragment>
<Header title='team' image='team' /> <Header title='team' image='team' />
<ItemsList list={teams} /> <ItemsList list={teams} close={close} />
</Fragment> </Fragment>
)} )}
{!isEmpty(players) && ( {!isEmpty(players) && (
<Fragment> <Fragment>
<Header title='player' image='player' /> <Header title='player' image='player' />
<ItemsList list={players} /> <ItemsList list={players} close={close} />
</Fragment> </Fragment>
)} )}
</Results> </Results>

Loading…
Cancel
Save