PHP is a bad language (fixes #59 properly)

This commit is contained in:
Marks Polakovs 2020-04-11 10:44:34 +02:00
parent 7c440bb281
commit 0306667f57
3 changed files with 6 additions and 6 deletions

View file

@ -79,8 +79,8 @@ interface TimeslotItemCentral {
export interface AuxItem {
type: "aux";
summary: string;
title?: string;
summary: string | number;
title: string | number;
managedid: number;
length: string;
trackid: number;

View file

@ -60,7 +60,7 @@ export const Item = memo(function Item({
collect={() => ({ id })}
>
<i className={"fa fa-circle " + x.type}></i>&nbsp;
{x.title}
{x.title.toString()}
{"artist" in x && " - " + x.artist}
<small
className={

View file

@ -135,15 +135,15 @@ export function AuxLibrary({ libraryId }: { libraryId: string }) {
value={title}
onChange={e => setTitle(e.target.value)}
/>
<Droppable droppableId="$CML">
<Droppable droppableId="$AUX">
{(provided, snapshot) => (
<div ref={provided.innerRef} {...provided.droppableProps}>
{items
.filter(
its =>
its.summary
its.title.toString()
.toLowerCase()
.indexOf(its.summary.toLowerCase()) > -1
.indexOf(its.title.toString().toLowerCase()) > -1
)
.map((item, index) => (
<Item