diff --git a/src/pages/Messages.jsx b/src/pages/Messages.jsx
index a2f8a65..f9315e5 100644
--- a/src/pages/Messages.jsx
+++ b/src/pages/Messages.jsx
@@ -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) => )
@@ -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}
/>
-
+