mirror of
https://github.com/Jellify-Music/App.git
synced 2026-02-07 11:08:29 -06:00
memoize queue item textticker
This commit is contained in:
@@ -90,23 +90,28 @@ export default function PlayerScreen({
|
||||
/>
|
||||
</YStack>
|
||||
|
||||
<YStack
|
||||
{ useMemo(() => {
|
||||
|
||||
<YStack
|
||||
alignItems="center"
|
||||
alignContent="center"
|
||||
flex={3}
|
||||
>
|
||||
<Text>Playing from</Text>
|
||||
<TextTicker {...TextTickerConfig}>
|
||||
<Text bold>
|
||||
{
|
||||
// If the Queue is a BaseItemDto, display the name of it
|
||||
typeof(queue) === 'object'
|
||||
? (queue as BaseItemDto).Name ?? "Untitled"
|
||||
: queue
|
||||
}
|
||||
</Text>
|
||||
</TextTicker>
|
||||
</YStack>
|
||||
>
|
||||
<Text>Playing from</Text>
|
||||
<TextTicker {...TextTickerConfig}>
|
||||
<Text bold>
|
||||
{
|
||||
// If the Queue is a BaseItemDto, display the name of it
|
||||
typeof(queue) === 'object'
|
||||
? (queue as BaseItemDto).Name ?? "Untitled"
|
||||
: queue
|
||||
}
|
||||
</Text>
|
||||
</TextTicker>
|
||||
</YStack>
|
||||
}, [
|
||||
queue
|
||||
])}
|
||||
|
||||
<Spacer flex={1} />
|
||||
</XStack>
|
||||
|
||||
Reference in New Issue
Block a user