rename showLoader

This commit is contained in:
Фролов 2021-08-18 13:50:44 +05:00
parent ad0719b54b
commit 68b0827f66

View File

@ -60,8 +60,7 @@ export default function Messages({idWell}) {
const [range, setRange] = useState([])
const [categories, setCategories] = useState([])
const [searchString, setSearchString] = useState('')
const [loader, setLoader] = useState(false)
const [showLoader, setShowLoader] = useState(false)
const children = filterOptions.map((line) => <Option key={line.value}>{line.label}</Option>)
@ -79,7 +78,7 @@ export default function Messages({idWell}) {
useEffect(() => {
const GetMessages = async () => {
setLoader(true)
setShowLoader(true)
try {
let begin = null
@ -97,7 +96,7 @@ export default function Messages({idWell}) {
searchString)
if (paginatedMessages === null){
notify(`Данных по скважине "${idWell}" нет`, 'warning')
setLoader(false)
setShowLoader(false)
return
}
@ -118,7 +117,7 @@ export default function Messages({idWell}) {
console.log(ex)
notify(`Не удалось загрузить сообщения по скважине "${idWell}"`, 'error')
}
setLoader(false)
setShowLoader(false)
}
GetMessages()
}, [idWell, page, categories, range, searchString])
@ -146,7 +145,7 @@ export default function Messages({idWell}) {
onSearch={onChangeSearchString}
/>
</div>
<LoaderPortal show={loader}>
<LoaderPortal show={showLoader}>
<Table
columns={columns}
dataSource={messages}