This commit is contained in:
Clément Le Bihan
2023-12-05 16:18:05 +01:00
parent 7678776872
commit 69d9a4c499
4 changed files with 34 additions and 28 deletions
+6 -4
View File
@@ -42,7 +42,7 @@ const SongHistory = (props: { quantity: number }) => {
if (acc.length === 0) {
return [curr];
}
if (acc.find((h) => h.song.id === curr.song.id)) {
if (acc.find((h) => h.song!.id === curr.song!.id)) {
return acc;
}
return [...acc, curr];
@@ -59,15 +59,17 @@ const SongHistory = (props: { quantity: number }) => {
) : (
musics.map((song) => (
<View
key={'short-history-tab' + song.id}
key={'short-history-tab' + song!.id}
style={{
paddingHorizontal: 16,
paddingVertical: 10,
flex: 1,
}}
>
<Pressable onPress={() => navigation.navigate('Play', { songId: song.id })}>
<Text numberOfLines={1}>{song.name}</Text>
<Pressable
onPress={() => navigation.navigate('Play', { songId: song!.id })}
>
<Text numberOfLines={1}>{song!.name}</Text>
</Pressable>
</View>
))