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

View File

@@ -1,22 +1,13 @@
import React from 'react'
import { Datagrid, List, TextField } from 'react-admin'
import { Datagrid, TextField } from 'react-admin'
import { useMediaQuery } from '@material-ui/core'
import { SimpleList, Title } from '../common'
import { SimpleList, List } from '../common'
import config from '../config'
const TranscodingList = (props) => {
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
return (
<List
title={
<Title
subTitle={'resources.transcoding.name'}
args={{ smart_count: 2 }}
/>
}
exporter={false}
{...props}
>
<List exporter={false} {...props}>
{isXsmall ? (
<SimpleList
primaryText={(r) => r.name}