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

[C-2051] Fix images in AddToPlaylistDrawer #2846

Merged
merged 2 commits into from
Feb 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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