From 2c106d1d3f6d59b10ad946e01e8bb3d0df587e40 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 14 Mar 2021 10:10:16 +0300
Subject: refactor: create Service abstraction

---
 src/containers/Contractors.tsx | 33 ---------------------------------
 1 file changed, 33 deletions(-)
 delete mode 100644 src/containers/Contractors.tsx

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

diff --git a/src/containers/Contractors.tsx b/src/containers/Contractors.tsx
deleted file mode 100644
index 5d589ea..0000000
--- a/src/containers/Contractors.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from 'react';
-import { useHistory } from 'react-router-dom';
-import Page from './Page';
-import ListTable from '../components/ListTable';
-import { useContractors } from '../hooks/useAPIClient';
-
-const fields = [
-  { key: 'vatId', label: 'УНП' },
-  { key: 'name', label: 'Название' },
-  { key: 'debt', label: 'Долг' },
-];
-
-const actions = [
-  { name: 'Добавить', route: 'contractors/add' },
-];
-
-const Contractors: React.FC = () => {
-  const history = useHistory();
-  const { data: contractors } = useContractors();
-
-  const handleRowClick = (index: number) => {
-    const contractor = contractors && contractors[index];
-    history.push(`/contractors/edit/${contractor?._id}`);
-  };
-
-  return (
-    <Page title="Контрагенты" actions={actions}>
-      <ListTable items={contractors} fields={fields} handleRowClick={handleRowClick} />
-    </Page>
-  );
-};
-
-export default Contractors;
-- 
cgit v1.2.3

