* fix(#1574): disable input email (#474)

* feat(ott-1593): add additional events (#475)

Co-authored-by: boyvanov <boyvanov.sergey@gmail.com>

* feat(ott-1614): add live indicator (#476)

Co-authored-by: Andrei Dekterev <57942757+dekterev@users.noreply.github.com>
Co-authored-by: boyvanov <50294488+boyvanov@users.noreply.github.com>
Co-authored-by: boyvanov <boyvanov.sergey@gmail.com>
Co-authored-by: PolyakovaM <55061222+PolyakovaM@users.noreply.github.com>
keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 4 years ago committed by GitHub
parent d7416486a2
commit b9ea06225b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/features/Common/Input/index.tsx
  2. 1
      src/features/JoinMatchPage/hooks.tsx
  3. 15
      src/features/JoinMatchPage/index.tsx
  4. 13
      src/features/MatchSidePlaylists/components/EventsList/index.tsx
  5. 61
      src/features/MatchSidePlaylists/components/TabEvents/index.tsx
  6. 2
      src/features/UserAccount/components/PersonalInfoForm/index.tsx
  7. 1
      src/requests/getUnauthenticatedMatch.tsx

@ -20,6 +20,7 @@ type Props = {
autoComplete?: string,
className?: string,
defaultValue?: string,
disabled?: boolean,
editIcon?: boolean,
inputWidth?: number,
label?: string,
@ -41,6 +42,7 @@ export const Input = ({
autoComplete = '',
className,
defaultValue,
disabled,
editIcon = false,
error,
inputWidth,
@ -79,6 +81,7 @@ export const Input = ({
required={required}
value={value}
defaultValue={defaultValue}
disabled={disabled}
onChange={onChange}
onBlur={onBlur}
onFocus={onFocus}

@ -41,6 +41,7 @@ export const useUnauthenticatedMatch = () => {
return {
handleSubmit,
live: matchInfo?.live,
matchDate,
teamName1,
teamName2,

@ -38,6 +38,7 @@ export const JoinMatchPage = () => {
const { sportType } = usePageParams()
const {
handleSubmit,
live,
matchDate,
teamName1,
teamName2,
@ -55,12 +56,14 @@ export const JoinMatchPage = () => {
<MatchInfo>
<DateInfoWrapper>
<DateInfo>{matchDate}</DateInfo>
<WatchLive>
<WatchLiveCircle />
<WatchLiveText>
<T9n t='watch_live' />
</WatchLiveText>
</WatchLive>
{live && (
<WatchLive>
<WatchLiveCircle />
<WatchLiveText>
<T9n t='watch_live' />
</WatchLiveText>
</WatchLive>
)}
</DateInfoWrapper>
<TeamsNameWrapper>
<EmptySpan>{teamName1}</EmptySpan>

@ -3,7 +3,11 @@ import map from 'lodash/map'
import type { Events, MatchInfo } from 'requests'
import type { PlaylistOption, Playlists } from 'features/MatchPage/types'
import type {
EventPlaylistOption,
PlaylistOption,
Playlists,
} from 'features/MatchPage/types'
import { PlaylistTypes } from 'features/MatchPage/types'
import { isEqual } from '../../helpers'
@ -27,15 +31,18 @@ export const EventsList = ({
}: Props) => (
<List>
{map(events, (event) => {
const repeatedEpisodes = event.rep || []
const eventPlaylist = {
data: [{
e: event.e,
h: event.h,
s: event.s,
}],
},
...repeatedEpisodes,
],
id: event.n,
type: PlaylistTypes.EVENT,
} as PlaylistOption
} as EventPlaylistOption
const isHomeTeam = event.t === profile?.team1.id
const team = isHomeTeam

@ -51,6 +51,12 @@ export const TabEvents = ({
),
), [areEventsReversed, events])
const reversedGroupEvents = useMemo(() => (
areEventsReversed
? reverse(groupedEvents)
: groupedEvents
), [areEventsReversed, groupedEvents])
if (!profile) return null
return (
@ -79,37 +85,32 @@ export const TabEvents = ({
</Tabs>
<HalfList>
{
map(
areEventsReversed
? reverse(groupedEvents)
: groupedEvents,
(halfEvents, idx) => {
const firstEvent = halfEvents[0]
const isFirstBlock = idx === 0
map(reversedGroupEvents, (halfEvents, idx) => {
const firstEvent = halfEvents[0]
const isFirstBlock = idx === 0
return (
<HalfEvents key={firstEvent.h}>
{
!isFirstBlock && (
<BlockTitle>
<T9n t='half_time' />
</BlockTitle>
)
}
<BlockTitle>
<T9n t={firstEvent.l} />
</BlockTitle>
<EventsList
events={halfEvents}
onSelect={onSelect}
playlists={playlists}
profile={profile}
selectedPlaylist={selectedPlaylist}
/>
</HalfEvents>
)
},
)
return (
<HalfEvents key={firstEvent.h}>
{
!isFirstBlock && (
<BlockTitle>
<T9n t='half_time' />
</BlockTitle>
)
}
<BlockTitle>
<T9n t={firstEvent.l} />
</BlockTitle>
<EventsList
events={halfEvents}
onSelect={onSelect}
playlists={playlists}
profile={profile}
selectedPlaylist={selectedPlaylist}
/>
</HalfEvents>
)
})
}
</HalfList>
</Fragment>

@ -90,9 +90,9 @@ export const PersonalInfoForm = (props: Props) => {
labelLexic='form_email'
labelWidth={labelWidth}
onChange={updateFormValue(email)}
editIcon
maxLength={500}
withError={false}
disabled
/>
<Combobox
value={selectedCountry?.name ?? readFormValue(country)}

@ -15,6 +15,7 @@ type Team = {
export type UnauthenticatedMatch = {
date: string,
live: boolean,
team1: Team,
team2: Team,
tournament: {

Loading…
Cancel
Save