From 4638e46a9379db64d57d4beee78ec75c78b4df5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=80=D0=BE=D0=BB=D0=BE=D0=B2?= Date: Mon, 26 Jul 2021 10:16:20 +0500 Subject: [PATCH] nit fix warnings and client update --- src/components/RigMnemo.jsx | 4 ++-- src/components/WellTreeSelector.jsx | 2 +- src/pages/Deposit.jsx | 2 +- src/pages/Report.jsx | 6 +++--- src/pages/WellAnalysis.jsx | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/RigMnemo.jsx b/src/components/RigMnemo.jsx index 3a9a58f..0d7c18e 100644 --- a/src/components/RigMnemo.jsx +++ b/src/components/RigMnemo.jsx @@ -57,8 +57,8 @@ export default function RigMnemo({ blockPositionLocal = blockPositionLocal ? blockPositionLocal : 0 const blockTranslate = `translate(-75, ${-35 + (50 * (30 - blockPositionLocal) / 30)})` - let bitPositionLocal = +bitPosition - bitPositionLocal = bitPositionLocal ? bitPositionLocal : 0 + //let bitPositionLocal = +bitPosition + //bitPositionLocal = bitPositionLocal ? bitPositionLocal : 0 //const bitTranslate = `translate(0, ${-41 + 41 * (3426 - bitPosition)/(3426 - 3200)})` const bitTranslate = `translate(0, 0)` diff --git a/src/components/WellTreeSelector.jsx b/src/components/WellTreeSelector.jsx index fde7017..26ade5c 100644 --- a/src/components/WellTreeSelector.jsx +++ b/src/components/WellTreeSelector.jsx @@ -6,7 +6,7 @@ import { TreeSelect } from 'antd' import { useHistory } from 'react-router-dom' import notify from './notify' -export default function WellTreeSelector({}) { +export default function WellTreeSelector() { const [wellsTree, setWellsTree] = useState([]) const [showLoader, setShowLoader] = useState(false) const history = useHistory() diff --git a/src/pages/Deposit.jsx b/src/pages/Deposit.jsx index 038ad3c..249802a 100644 --- a/src/pages/Deposit.jsx +++ b/src/pages/Deposit.jsx @@ -7,7 +7,7 @@ import {ClusterService} from '../services/api' import notify from '../components/notify' const calcViewParams = (clusters) => { - if (clusters.length === 0) + if (clusters && clusters.length === 0) return {center:[60.81226, 70.0562], zoom: 5} const center = clusters.reduce((sum, cluster) => { diff --git a/src/pages/Report.jsx b/src/pages/Report.jsx index c7574d3..aa7c23e 100644 --- a/src/pages/Report.jsx +++ b/src/pages/Report.jsx @@ -67,7 +67,7 @@ export default function Report(props) { title: 'Название отчета', dataIndex: 'reportName', key: 'reportName', - render: name => getReportFile(event, name)} download={name}>{name} + render: name => }, ]; @@ -80,10 +80,10 @@ export default function Report(props) {
{ progressData.operation }
- {getReportFile(event, progressData.reportName)}} + ) } diff --git a/src/pages/WellAnalysis.jsx b/src/pages/WellAnalysis.jsx index f0f5b6f..f83d8b7 100644 --- a/src/pages/WellAnalysis.jsx +++ b/src/pages/WellAnalysis.jsx @@ -118,7 +118,7 @@ export default function WellAnalysis() { setLoader(false) } GetOperations() - }, [id, categories, range]) + }, [id, categories, range, page]) return(<>