diff --git a/src/features/Landings/hooks.tsx b/src/features/Landings/hooks.tsx index 3bf3e02e..3683c5a6 100644 --- a/src/features/Landings/hooks.tsx +++ b/src/features/Landings/hooks.tsx @@ -6,14 +6,14 @@ import { import size from 'lodash/size' import includes from 'lodash/includes' +import { PAGES } from 'config' + import type { TournamentInfo } from 'requests/getTournamentInfo' import type { Landing } from 'requests/getLanding' import { getLanding } from 'requests/getLanding' import { getLandingLogo } from 'requests/getLandingMedia' import { getTournamentInfo } from 'requests/getTournamentInfo' -import { PAGES } from 'config/pages' - import { redirectToUrl } from 'helpers/redirectToUrl' import { useLexicsStore } from 'features/LexicsStore' diff --git a/src/features/Landings/index.tsx b/src/features/Landings/index.tsx index c2deea0c..03150bde 100644 --- a/src/features/Landings/index.tsx +++ b/src/features/Landings/index.tsx @@ -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 = () => { ) diff --git a/src/features/Landings/styled.tsx b/src/features/Landings/styled.tsx index f3e02e83..9cee03a1 100644 --- a/src/features/Landings/styled.tsx +++ b/src/features/Landings/styled.tsx @@ -2,7 +2,11 @@ import styled, { css } from 'styled-components/macro' import { isMobileDevice } from 'config/userAgent' -import { ButtonSolid, customScrollbar } from 'features/Common' +import { + ButtonSolid, + customScrollbar, + Image, +} from 'features/Common' import { Logo } from 'features/Logo' type ButtonProps = { @@ -115,7 +119,7 @@ export const MainLogoWrapper = styled.div` : ''}; ` -export const MainLogoImg = styled.img` +export const MainLogoImg = styled(Image)` width: 48%; height: 48%; position: relative; diff --git a/src/features/MatchPage/store/hooks/index.tsx b/src/features/MatchPage/store/hooks/index.tsx index ec788b1f..d4438600 100644 --- a/src/features/MatchPage/store/hooks/index.tsx +++ b/src/features/MatchPage/store/hooks/index.tsx @@ -9,14 +9,14 @@ import includes from 'lodash/includes' import filter from 'lodash/filter' import isEmpty from 'lodash/isEmpty' +import { PAGES } from 'config' + import { useAuthStore } from 'features/AuthStore' import { Tabs } from 'features/MatchSidePlaylists/config' import { initialCircleAnimation } from 'features/CircleAnimationBar' import type { TCircleAnimation } from 'features/CircleAnimationBar' import { StatsType } from 'features/MatchSidePlaylists/components/TabStats/config' -import { PAGES } from 'config/pages' - import type { MatchInfo } from 'requests/getMatchInfo' import { getMatchInfo } from 'requests/getMatchInfo' import { getViewMatchDuration } from 'requests/getViewMatchDuration' diff --git a/src/features/TournamentPage/hooks.tsx b/src/features/TournamentPage/hooks.tsx index c7986e23..2e93603f 100644 --- a/src/features/TournamentPage/hooks.tsx +++ b/src/features/TournamentPage/hooks.tsx @@ -13,7 +13,7 @@ import { import { openSubscribePopup, redirectToUrl } from 'helpers' -import { PAGES } from 'config/pages' +import { PAGES } from 'config' import { useName } from 'features/Name'