summaryrefslogtreecommitdiff
path: root/src/containers/Products.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/Products.tsx')
-rw-r--r--src/containers/Products.tsx14
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>
);
};