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
+23
View File
@@ -0,0 +1,23 @@
import React from 'react'
import { List as RAList } from 'react-admin'
import Pagination from './Pagination'
import { Title } from './index'
const List = (props) => {
const { resource } = props
return (
<RAList
title={
<Title
subTitle={`resources.${resource}.name`}
args={{ smart_count: 2 }}
/>
}
perPage={15}
pagination={<Pagination />}
{...props}
/>
)
}
export default List