From e1fc8ea5904de90f94d3f63287555c75067846ac Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 14 Mar 2021 03:03:12 +0300
Subject: feat: add Page component

---
 src/containers/Products.tsx | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'src/containers/Products.tsx')

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>
   );
 };
 
-- 
cgit v1.2.3

