IN-564-ads
develop
https://insports.atlassian.net/browse/IN-564?filter=10008
features(#564): add ads to main page
3c9df6e918
e1c8ff491e
import styled from 'styled-components'
styled-components/macro
import { MouseEvent } from 'react'
import type
import { EventGA } from '../../types'
type MobileAdTypes = {
ad: AdType,
отступ
import { AdResponse, AdsListType } from 'requests'
import { useLang } from 'features/LexicsStore/hooks/useLang'
import { useMemo } from 'react'
перенеси импорт на верхний уровень
import styled, { css } from 'styled-components'
export const isMobileDevice = /iPhone|Android/.test(navigator.userAgent)
export const device = navigator.userAgent
перенеси наверх и замени navigator.userAgent на device в других выражениях
import { readToken } from 'helpers'
import { useRecoilValue } from 'recoil'
импорт на верхний уроверь
}
export type AdType = {
'duration': number,
кавычки не нужны
type AdsViewResponse = {
'data': string,
const chooseStyle = (type: number) => {
switch (true) {
сработает ли такое?
switch (VIEW_ADS[type]) { case VIEW_ADS.COLUMN...
нет, такое не работает, переделал так
const chooseStyle = (type: number) => { switch (true) { case VIEW_ADS.COLUMN === type: return 'grid-row: 1 / 3; img {max-height: none;}' case VIEW_ADS.ROW === type: return 'grid-column: 1 / 3' case VIEW_ADS.SQUARE === type: return 'grid-row: 1 / 3; grid-column: 1 / 3; img {max-height: none;}' case VIEW_ADS.SECOND_COLUMN === type: return 'grid-column: 2 / 3; grid-row: 1 / 1' case VIEW_ADS.SECOND_ROW === type: return 'grid-column: 1 / 2; grid-row: 2 / 3;' default: return '' } }
e188c32fcd
No due date set.
No dependencies set.
Deleting a branch is permanent. It CANNOT be undone. Continue?
https://insports.atlassian.net/browse/IN-564?filter=10008
3c9df6e918toe1c8ff491e3 years agoimport styled from 'styled-components'styled-components/macro
import { MouseEvent } from 'react'import type
import { EventGA } from '../../types'type MobileAdTypes = {ad: AdType,отступ
import styled from 'styled-components'styled-components/macro
import { AdResponse, AdsListType } from 'requests'import type
import { useLang } from 'features/LexicsStore/hooks/useLang'import { useMemo } from 'react'перенеси импорт на верхний уровень
import styled, { css } from 'styled-components'styled-components/macro
export const isMobileDevice = /iPhone|Android/.test(navigator.userAgent)export const device = navigator.userAgentперенеси наверх и замени navigator.userAgent на device в других выражениях
import { readToken } from 'helpers'import { useRecoilValue } from 'recoil'импорт на верхний уроверь
}export type AdType = {'duration': number,кавычки не нужны
}type AdsViewResponse = {'data': string,кавычки не нужны
}const chooseStyle = (type: number) => {switch (true) {сработает ли такое?
switch (VIEW_ADS[type]) {
case VIEW_ADS.COLUMN...
нет, такое не работает, переделал так
e188c32fcdinto develop 3 years agoReviewers
e188c32fcd.