fix(#2776): sort videotab in matchpage

keep-around/b214ac7012ef42593bee62c207888a2593bc5a38
Andrei Dekterev 3 years ago
parent 7f1855f77f
commit ab81156e5a
  1. 4
      src/features/MatchSidePlaylists/components/TabVideo/index.tsx
  2. 1
      src/features/MatchSidePlaylists/hooks.tsx

@ -6,6 +6,7 @@ import {
import { format } from 'date-fns'
import map from 'lodash/map'
import sortBy from 'lodash/sortBy'
import { MatchCard } from 'features/MatchCard'
import { TournamentData } from 'features/MatchPage/types'
@ -60,7 +61,6 @@ export const TabVideo = ({
return !someProfileMatch
}, [tournamentData, profileId, profileDate])
return (
<Fragment>
<VideoDate
@ -72,7 +72,7 @@ export const TabVideo = ({
/>
<MatchesWrapper>
{
map(matches, (match) => (
map(sortBy(matches, ['!live', 'date']), (match) => (
<MatchCard
key={match.id}
match={match}

@ -17,7 +17,6 @@ export const useMatchSidePlaylists = () => {
tournamentData,
} = useMatchPageStore()
const [selectedTab, setSelectedTab] = useState<Tabs>(Tabs.WATCH)
const isWatchTabVisible = useMemo(() => {
const playListFilter = reduce(
playlists.match,

Loading…
Cancel
Save