import React from 'react'
import {
Datagrid,
TextField,
FunctionField,
ReferenceField,
Filter,
SearchInput,
NullableBooleanInput,
} from 'react-admin'
import { useMediaQuery } from '@material-ui/core'
import { FaKey } from 'react-icons/fa'
import { SimpleList, List, DateField } from '../common'
const PlayerFilter = (props) => (
)
const PlayerList = ({ permissions, ...props }) => {
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
return (
}
>
{isXsmall ? (
r.name}
secondaryText={(r) => r.userName}
tertiaryText={(r) => (
<>
{r.hasApiKey && } {r.maxBitRate ? r.maxBitRate : '-'}
>
)}
/>
) : (
{permissions === 'admin' && }
(r.maxBitRate ? r.maxBitRate : '-')}
/>
(r.hasApiKey ? : null)}
/>
)}
)
}
export default PlayerList