diff options
author | eug-vs <eug-vs@keemail.me> | 2021-03-14 03:03:12 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-03-14 03:03:12 +0300 |
commit | e1fc8ea5904de90f94d3f63287555c75067846ac (patch) | |
tree | 0046cb821cba9153a202ab7e21f291b69bafe926 /src/containers/Products.tsx | |
parent | 64a537425a05a15ecfac3bf314735876dbbd8ed7 (diff) | |
download | commercel-ui-e1fc8ea5904de90f94d3f63287555c75067846ac.tar.gz |
feat: add Page component
Diffstat (limited to 'src/containers/Products.tsx')
-rw-r--r-- | src/containers/Products.tsx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/containers/Products.tsx b/src/containers/Products.tsx index 8cd301a..3542df1 100644 --- a/src/containers/Products.tsx +++ b/src/containers/Products.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import Paper from '../components/Paper'; -import DataTable from '../components/DataTable'; +import Page from '../containers/Page'; +import ListTable from '../components/ListTable'; import { useProducts } from '../hooks/useAPIClient'; const fields = [ @@ -9,13 +9,17 @@ const fields = [ { key: 'type', label: 'Тип' }, ]; +const actions = [ + { name: 'Добавить', route: 'products/add' } +]; + const Home: React.FC = () => { const { data: products } = useProducts(); return ( - <Paper> - <DataTable title="Товары" items={products} fields={fields} /> - </Paper> + <Page title="Товары" actions={actions}> + <ListTable items={products} fields={fields} /> + </Page> ); }; |