From ef742ea9b2f246f74eae74169675a331679ad41c Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Fri, 26 Mar 2021 01:56:04 +0300
Subject: feat: add strong typing where possible

---
 src/services/waybills/WaybillPanel.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/services/waybills/WaybillPanel.tsx')

diff --git a/src/services/waybills/WaybillPanel.tsx b/src/services/waybills/WaybillPanel.tsx
index 1d1701d..c501fc2 100644
--- a/src/services/waybills/WaybillPanel.tsx
+++ b/src/services/waybills/WaybillPanel.tsx
@@ -3,12 +3,13 @@ import { useHistory } from 'react-router-dom';
 import Button from '../../components/Button';
 import { patch, baseURL } from '../../requests';
 import { PanelProps } from '../../lib/ServiceContext';
+import { Waybill } from '../types';
 
 
-const WaybillPanel: React.FC<PanelProps> = ({ item, mutate }) => {
+const WaybillPanel: React.FC<PanelProps<Waybill>> = ({ item, mutate }) => {
   const history = useHistory();
 
-  const handleChangeStatus = (status: any) => patch(`/waybills/${item._id}`, { status })
+  const handleChangeStatus = (status: Waybill['status']) => patch(`/waybills/${item._id}`, { status })
     .then(() => {
       history.push('/waybills');
       mutate({ ...item, status });
-- 
cgit v1.2.3

