carplay fioxes

This commit is contained in:
Violet Caulfield
2025-02-23 10:59:15 -06:00
parent ed86e0e0bb
commit 27c40f168d
2 changed files with 12 additions and 10 deletions

View File

@@ -5,13 +5,17 @@ import { GridTemplate, ListTemplate } from "react-native-carplay"
export const CarPlayRecentArtists = (artists : BaseItemDto[]) => new ListTemplate({
title: "Recently Played",
items: artists.map(artist => {
return {
id: artist.Id!,
text: artist.Name ? artist.Name : "Untitled Track",
image: {
uri: getImageApi(Client.api!).getItemImageUrlById(artist.Id!)
}
sections: [
{
items: artists.map(artist => {
return {
id: artist.Id!,
text: artist.Name ? artist.Name : "Untitled Track",
image: {
uri: getImageApi(Client.api!).getItemImageUrlById(artist.Id!)
}
}
})
}
})
]
})

View File

@@ -3,10 +3,8 @@ import { ListTemplate } from "react-native-carplay";
export const CarPlayRecentlyPlayed = (recentTracks : BaseItemDto[]) => new ListTemplate({
title: "Recently Played",
sections: [
{
header: `Recently Played`,
items: recentTracks.map(track => {
return {
id: track.Id!,