memoize player artwork

This commit is contained in:
Violet Caulfield
2025-02-11 13:36:29 -06:00
parent f7c58c4dcc
commit b2794ac98a
+12 -6
View File
@@ -103,14 +103,20 @@ export default function PlayerScreen({
justifyContent="center"
alignContent="center"
minHeight={width / 1.1}
onPress={() => {
useTogglePlayback.mutate(undefined)
}}
// onPress={() => {
// useTogglePlayback.mutate(undefined)
// }}
>
<BlurhashedImage
item={nowPlaying!.item}
width={width / 1.1}
{ useMemo(() => {
return (
<BlurhashedImage
item={nowPlaying!.item}
width={width / 1.1}
/>
)
}, [
nowPlaying
])}
</XStack>
<XStack marginHorizontal={20} paddingVertical={5}>