From ab81156e5af2cfba6fae8da3b4092411ef32a0cc Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Thu, 8 Sep 2022 17:19:54 +0400 Subject: [PATCH] fix(#2776): sort videotab in matchpage --- src/features/MatchSidePlaylists/components/TabVideo/index.tsx | 4 ++-- src/features/MatchSidePlaylists/hooks.tsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/features/MatchSidePlaylists/components/TabVideo/index.tsx b/src/features/MatchSidePlaylists/components/TabVideo/index.tsx index 04e633ab..14cbbbe5 100644 --- a/src/features/MatchSidePlaylists/components/TabVideo/index.tsx +++ b/src/features/MatchSidePlaylists/components/TabVideo/index.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 ( { - map(matches, (match) => ( + map(sortBy(matches, ['!live', 'date']), (match) => ( { tournamentData, } = useMatchPageStore() const [selectedTab, setSelectedTab] = useState(Tabs.WATCH) - const isWatchTabVisible = useMemo(() => { const playListFilter = reduce( playlists.match,