refactor: move all buttons to tsx #338

This commit is contained in:
Prayag Prajapati committed 2024-11-24 23:46:20 +05:30
1 parent 9be02b6392
commit c6b5d6a4a2
13 files changed
+170 -170

No files matched your search

+11 -9
View File
@@ -135,6 +135,7 @@ const QueueButton = () => {
left: "50%",
transform: "translate(-50%,-50%)",
fontSize: "2em",
//@ts-ignore
"--wght": "100",
}}
>
@@ -164,12 +165,13 @@ const QueueButton = () => {
</MenuItem>
</>
)}
{queueItems?.slice(currentItemIndex + 1, queueItems.length - 1)
.length > 0 && (
<Typography px="1em" my={2} variant="h5" fontWeight={300}>
Queue:
</Typography>
)}
{queueItems &&
queueItems.slice(currentItemIndex + 1, queueItems.length - 1)
.length > 0 && (
<Typography px="1em" my={2} variant="h5" fontWeight={300}>
Queue:
</Typography>
)}
{queueItems
?.slice(currentItemIndex + 1, queueItems.length - 1)
.map((item, index) => {
@@ -193,7 +195,7 @@ const QueueButton = () => {
<img
className="queue-item-image"
src={getImageUrlsApi(api).getItemImageUrlById(
item?.Id,
item?.Id ?? "",
"Primary",
{
tag: item.ImageTags?.Primary,
@@ -205,10 +207,10 @@ const QueueButton = () => {
<img
className="queue-item-image"
src={getImageUrlsApi(api).getItemImageUrlById(
item?.AlbumId,
item?.AlbumId ?? "",
"Primary",
{
tag: item.AlbumPrimaryImageTag[0],
tag: item.AlbumPrimaryImageTag?.[0],
},
)}
alt={item.Name ?? "image"}