feat(2324): add image in header mobile

keep-around/8cd2119cc46d04475483e617c83fc41e7d4e4101
Berdyshev Oleksandr 4 years ago
parent 20e770c4c0
commit 8cd2119cc4
  1. BIN
      public/images/5704_mobile.png
  2. 2
      src/features/ProfileHeader/index.tsx
  3. 10
      src/features/ProfileHeader/styled.tsx

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

@ -46,7 +46,7 @@ export const ProfileHeader = ({
sportType,
} = usePageParams()
const url = '/images/5704.png'
const url = '/images/5704'
const color = useProfileColor(profileId)
const imageHeader = profileId === 5704
&& sportType === SportTypes.FOOTBALL

@ -13,8 +13,13 @@ export const defaultHeaderStyles = (
color: string = DEFAULT_HEADER_COLOR, headerImage: string | undefined | null,
) => {
if (headerImage && client.name !== 'facr') {
return css`background: url(${headerImage});
background-size: 100% 100%;`
return css`background: url(${headerImage}.png);
background-size: 100% 100%;
@media (max-width: 450px){
background: url(${headerImage}_mobile.png);
background-size: 100% 100%;
}
`
}
if (color.includes('linear-gradient')) {
return css`
@ -52,7 +57,6 @@ export const HeaderStyled = styled.header<HeaderProps>`
${isMobileDevice
? css`
height: auto;
padding: 8px;
`
: ''}

Loading…
Cancel
Save