diff --git a/src/features/Common/Input/index.tsx b/src/features/Common/Input/index.tsx index fcb4488a..0336305d 100644 --- a/src/features/Common/Input/index.tsx +++ b/src/features/Common/Input/index.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} diff --git a/src/features/JoinMatchPage/hooks.tsx b/src/features/JoinMatchPage/hooks.tsx index 2a2ca644..94e33bad 100644 --- a/src/features/JoinMatchPage/hooks.tsx +++ b/src/features/JoinMatchPage/hooks.tsx @@ -41,6 +41,7 @@ export const useUnauthenticatedMatch = () => { return { handleSubmit, + live: matchInfo?.live, matchDate, teamName1, teamName2, diff --git a/src/features/JoinMatchPage/index.tsx b/src/features/JoinMatchPage/index.tsx index 085e1b1e..f0eee3b1 100644 --- a/src/features/JoinMatchPage/index.tsx +++ b/src/features/JoinMatchPage/index.tsx @@ -38,6 +38,7 @@ export const JoinMatchPage = () => { const { sportType } = usePageParams() const { handleSubmit, + live, matchDate, teamName1, teamName2, @@ -55,12 +56,14 @@ export const JoinMatchPage = () => { {matchDate} - - - - - - + {live && ( + + + + + + + )} {teamName1} diff --git a/src/features/MatchSidePlaylists/components/EventsList/index.tsx b/src/features/MatchSidePlaylists/components/EventsList/index.tsx index 29ff5ba0..8a047564 100644 --- a/src/features/MatchSidePlaylists/components/EventsList/index.tsx +++ b/src/features/MatchSidePlaylists/components/EventsList/index.tsx @@ -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) => ( {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 diff --git a/src/features/MatchSidePlaylists/components/TabEvents/index.tsx b/src/features/MatchSidePlaylists/components/TabEvents/index.tsx index 91863c2c..7a2a746d 100644 --- a/src/features/MatchSidePlaylists/components/TabEvents/index.tsx +++ b/src/features/MatchSidePlaylists/components/TabEvents/index.tsx @@ -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 = ({ { - 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 ( - - { - !isFirstBlock && ( - - - - ) - } - - - - - - ) - }, - ) + return ( + + { + !isFirstBlock && ( + + + + ) + } + + + + + + ) + }) } diff --git a/src/features/UserAccount/components/PersonalInfoForm/index.tsx b/src/features/UserAccount/components/PersonalInfoForm/index.tsx index a8494ce0..7b5ed6f2 100644 --- a/src/features/UserAccount/components/PersonalInfoForm/index.tsx +++ b/src/features/UserAccount/components/PersonalInfoForm/index.tsx @@ -90,9 +90,9 @@ export const PersonalInfoForm = (props: Props) => { labelLexic='form_email' labelWidth={labelWidth} onChange={updateFormValue(email)} - editIcon maxLength={500} withError={false} + disabled />