|
|
|
|
@ -1,14 +1,10 @@ |
|
|
|
|
import { |
|
|
|
|
BaseSyntheticEvent, |
|
|
|
|
Fragment, |
|
|
|
|
useCallback, |
|
|
|
|
} from 'react' |
|
|
|
|
import { Fragment } from 'react' |
|
|
|
|
|
|
|
|
|
import format from 'date-fns/format' |
|
|
|
|
|
|
|
|
|
import map from 'lodash/map' |
|
|
|
|
|
|
|
|
|
import { isMobileDevice } from 'config/userAgent' |
|
|
|
|
import { isMobileDevice } from 'config' |
|
|
|
|
|
|
|
|
|
import { T9n } from 'features/T9n' |
|
|
|
|
|
|
|
|
|
@ -66,12 +62,6 @@ const Landings = () => { |
|
|
|
|
} = useLandings() |
|
|
|
|
|
|
|
|
|
const fallbackSrc = '/images/tournament-fallback.png' |
|
|
|
|
const onError = useCallback((e: BaseSyntheticEvent) => { |
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
|
|
e.target.onError = '' |
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
|
|
e.target.src = fallbackSrc |
|
|
|
|
}, [fallbackSrc]) |
|
|
|
|
|
|
|
|
|
if ((!tournamentInfo && !isNonExistLanding) |
|
|
|
|
|| (isNonExistLanding && !nonExistLogoSrc)) return null |
|
|
|
|
@ -115,7 +105,7 @@ const Landings = () => { |
|
|
|
|
<LogoBackground /> |
|
|
|
|
<MainLogoImg |
|
|
|
|
src={logo || nonExistLogoSrc} |
|
|
|
|
onError={onError} |
|
|
|
|
fallbackSrc={fallbackSrc} |
|
|
|
|
/> |
|
|
|
|
</MainLogoWrapper> |
|
|
|
|
) |
|
|
|
|
|