Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
[C-2051] Fix images in AddToPlaylistDrawer (#2846)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptype authored Feb 14, 2023
1 parent bf71c13 commit 092c3e8
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { CollectionImage } from 'app/components/image/CollectionImage'
import { useToast } from 'app/hooks/useToast'
import { makeStyles, shadow } from 'app/styles'

import type { ImageProps } from '../image/FastImage'

const { addTrackToPlaylist, createPlaylist } = cacheCollectionsActions
const { getTrackId, getTrackTitle } = addToPlaylistUISelectors
const { getAccountWithOwnPlaylists } = accountSelectors
Expand Down Expand Up @@ -55,8 +57,14 @@ export const AddToPlaylistDrawer = () => {
const user = useSelector(getAccountWithOwnPlaylists)

const renderImage = useCallback(
(item) => () =>
<CollectionImage collection={item} size={SquareSizes.SIZE_480_BY_480} />,
(item) => (props?: ImageProps) =>
(
<CollectionImage
collection={item}
size={SquareSizes.SIZE_480_BY_480}
{...props}
/>
),
[]
)

Expand Down

0 comments on commit 092c3e8

Please sign in to comment.