diff options
| author | eug-vs <eug-vs@keemail.me> | 2021-03-26 01:56:04 +0300 | 
|---|---|---|
| committer | eug-vs <eug-vs@keemail.me> | 2021-03-26 01:56:04 +0300 | 
| commit | ef742ea9b2f246f74eae74169675a331679ad41c (patch) | |
| tree | 693e92f3e6c2897038875550a12bbc1191b6d5c0 /src/services/waybills/WaybillPanel.tsx | |
| parent | 865b41114060765308d560181f4996c0aa7a3e74 (diff) | |
| download | commercel-ui-ef742ea9b2f246f74eae74169675a331679ad41c.tar.gz | |
feat: add strong typing where possible
Diffstat (limited to 'src/services/waybills/WaybillPanel.tsx')
| -rw-r--r-- | src/services/waybills/WaybillPanel.tsx | 5 | 
1 files changed, 3 insertions, 2 deletions
| 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 }); | 
