Use a custom List component
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user