import React, { Fragment } from 'react'
import {
BooleanField,
Datagrid,
DateField,
Filter,
List,
NumberField,
SearchInput,
Show,
SimpleShowLayout,
TextField,
TextInput
} from 'react-admin'
import { useMediaQuery } from '@material-ui/core'
import { BitrateField, DurationField, Pagination, Title } from '../common'
import AddToQueueButton from './AddToQueueButton'
import { PlayButton, SimpleList } from '../common'
import { useDispatch } from 'react-redux'
import { setTrack, addTrack } from '../player'
import AddIcon from '@material-ui/icons/Add'
const SongFilter = (props) => (
)
const SongBulkActionButtons = (props) => (
)
const SongDetails = (props) => {
return (
)
}
const SongList = (props) => {
const dispatch = useDispatch()
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('md'))
return (
}
sort={{ field: 'title', order: 'ASC' }}
exporter={false}
bulkActionButtons={}
filters={}
perPage={isXsmall ? 50 : 15}
pagination={}
>
{isXsmall ? (
(
<>
} />
{r.title}
>
)}
secondaryText={(r) => r.artist}
tertiaryText={(r) => }
linkType={(id, basePath, record) => dispatch(setTrack(record))}
/>
) : (
}
rowClick={(id, basePath, record) => dispatch(setTrack(record))}
>
{isDesktop && }
{isDesktop && }
{isDesktop && }
)}
)
}
export default SongList