Use a custom List component

This commit is contained in:
Deluan
2020-05-15 10:20:11 -04:00
parent 9490374faa
commit b3af0f880b
8 changed files with 34 additions and 45 deletions
+2 -9
View File
@@ -1,25 +1,18 @@
import React from 'react'
import {
Datagrid,
List,
TextField,
DateField,
FunctionField,
ReferenceField,
} from 'react-admin'
import { useMediaQuery } from '@material-ui/core'
import { SimpleList, Title } from '../common'
import { SimpleList, List } from '../common'
const PlayerList = (props) => {
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
return (
<List
title={
<Title subTitle={'resources.player.name'} args={{ smart_count: 2 }} />
}
exporter={false}
{...props}
>
<List exporter={false} {...props}>
{isXsmall ? (
<SimpleList
primaryText={(r) => r.client}