|
|
|
|
@ -14,7 +14,7 @@ import { getMatchPlaylists } from 'requests/getMatchPlaylists' |
|
|
|
|
import { usePageParams } from 'hooks/usePageParams' |
|
|
|
|
|
|
|
|
|
import type { Playlists } from 'features/MatchPage/types' |
|
|
|
|
import { buildPlaylists } from 'features/MatchPage/helpers/buildPlaylists' |
|
|
|
|
import { buildPlaylists, FULL_GAME_KEY } from 'features/MatchPage/helpers/buildPlaylists' |
|
|
|
|
|
|
|
|
|
import { usePlaylistLexics } from './usePlaylistLexics' |
|
|
|
|
import { useSelectedPlaylist } from './useSelectedPlaylist' |
|
|
|
|
@ -65,7 +65,9 @@ export const useMatchPlaylists = (profile: MatchInfo) => { |
|
|
|
|
}, [fetchLexics, setInitialSeletedPlaylist]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (selectedPlaylist?.id !== FULL_GAME_KEY) return |
|
|
|
|
setSelectedPlaylist(matchPlaylists?.match[0]) |
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
|
}, [ |
|
|
|
|
matchPlaylists?.match, |
|
|
|
|
profileId, |
|
|
|
|
|