@@ -45,7 +45,11 @@ const MyCdPage = () => {
4545 const likedCdPlaylist = useMyLikedCdList ( 'RECENT' )
4646
4747 const playlistQuery = selectedTab === 'MY' ? myCdPlaylist : likedCdPlaylist
48- const playlistData = useMemo ( ( ) => playlistQuery . data ?? [ ] , [ playlistQuery . data ] )
48+ const playlistData = useMemo ( ( ) => {
49+ const data = playlistQuery . data ?? [ ]
50+ return selectedTab === 'LIKE' ? data . filter ( ( p ) => p . isPublic ) : data
51+ } , [ playlistQuery . data , selectedTab ] )
52+
4953 const isLoading = playlistQuery . isLoading
5054 const isError = playlistQuery . isError
5155 const isMyEmpty = ! myCdPlaylist . isLoading && ( myCdPlaylist . data ?. length ?? 0 ) === 0
@@ -218,48 +222,50 @@ const MyCdPage = () => {
218222 </ Button >
219223 ) }
220224 </ Container >
221- < PlaylistCarousel
222- data = { playlistData ?? [ ] }
223- onCenterChange = { handleCenterChange }
224- currentPlaylistId = { currentPlaylist ?. playlistId }
225- isPlaying = { isPlaying }
226- />
227- < ActionBar
228- playlistId = { centerItem . playlistId ?? 0 }
229- creatorId = { currentPlaylist . creator . creatorId }
230- stickers = { playlistDetail ?. cdResponse ?. cdItems || [ ] }
231- type = "MY"
232- selectedTab = { selectedTab }
233- />
234- < Title $isMobile = { isMobile } > { centerItem . playlistName } </ Title >
235- { selectedTab === 'LIKE' && playlistDetail ?. creatorNickname && (
236- < Creator > { playlistDetail . creatorNickname } </ Creator >
237- ) }
238-
239- < BottomWrapper >
240- < ProgressBar
241- trackLengths = { currentPlaylist . songs . map ( ( t ) => t . youtubeLength ) || [ ] }
242- currentIndex = { currentTrackIndex }
243- onClick = { handleProgressClick }
244- />
245-
246- < ControlBar
225+ < CenterWrapper >
226+ < PlaylistCarousel
227+ data = { playlistData ?? [ ] }
228+ onCenterChange = { handleCenterChange }
229+ currentPlaylistId = { currentPlaylist ?. playlistId }
247230 isPlaying = { isPlaying }
248- onTogglePlay = { ( ) => {
249- if ( isMobile && ! isPlaying ) {
250- unmuteOnce ( )
251- }
252-
253- if ( isPlaying ) {
254- pause ( )
255- } else {
256- play ( )
257- }
258- } }
259- onNext = { nextTrack }
260- onPrev = { prevTrack }
261231 />
262- </ BottomWrapper >
232+ < ActionBar
233+ playlistId = { centerItem . playlistId ?? 0 }
234+ creatorId = { currentPlaylist . creator . creatorId }
235+ stickers = { playlistDetail ?. cdResponse ?. cdItems || [ ] }
236+ type = "MY"
237+ selectedTab = { selectedTab }
238+ />
239+ < Title $isMobile = { isMobile } > { centerItem . playlistName } </ Title >
240+ { selectedTab === 'LIKE' && playlistDetail ?. creatorNickname && (
241+ < Creator > { playlistDetail . creatorNickname } </ Creator >
242+ ) }
243+
244+ < BottomWrapper >
245+ < ProgressBar
246+ trackLengths = { currentPlaylist . songs . map ( ( t ) => t . youtubeLength ) || [ ] }
247+ currentIndex = { currentTrackIndex }
248+ onClick = { handleProgressClick }
249+ />
250+
251+ < ControlBar
252+ isPlaying = { isPlaying }
253+ onTogglePlay = { ( ) => {
254+ if ( isMobile && ! isPlaying ) {
255+ unmuteOnce ( )
256+ }
257+
258+ if ( isPlaying ) {
259+ pause ( )
260+ } else {
261+ play ( )
262+ }
263+ } }
264+ onNext = { nextTrack }
265+ onPrev = { prevTrack }
266+ />
267+ </ BottomWrapper >
268+ </ CenterWrapper >
263269 </ >
264270 ) }
265271 </ div >
@@ -277,6 +283,10 @@ const Container = styled.div`
277283const Title = styled . p < { $isMobile ?: boolean } > `
278284 ${ ( { theme } ) => theme . FONT . headline1 } ;
279285 padding-top: ${ ( { $isMobile } ) => ( $isMobile ? '24px' : '40px' ) } ;
286+
287+ @media (min-height: 899px) {
288+ padding-top: 56px;
289+ }
280290`
281291
282292const BottomWrapper = styled . div `
@@ -318,3 +328,13 @@ const CenterContent = styled.div`
318328 ${ flexColCenter } ;
319329 text-align: center;
320330`
331+
332+ const CenterWrapper = styled . div `
333+ display: flex;
334+ flex-direction: column;
335+ margin-top: 0;
336+
337+ @media (min-height: 899px) {
338+ margin-top: 80px;
339+ }
340+ `
0 commit comments