From 1dbe047902a67a362d36265ebc990a195a588b8a 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, 31 May 2021 15:10:35 +0500 Subject: [PATCH] fix notifications --- src/components/WellTreeSelector.jsx | 1 + src/pages/Messages.jsx | 4 ++-- src/pages/TelemetryView.jsx | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/WellTreeSelector.jsx b/src/components/WellTreeSelector.jsx index eeab7f5..492a811 100644 --- a/src/components/WellTreeSelector.jsx +++ b/src/components/WellTreeSelector.jsx @@ -49,6 +49,7 @@ export default function WellTreeSelector(props) { setWellsTree(wellsTree) } catch (e) { + console.error(`${e.message}`); } setLoader(false) diff --git a/src/pages/Messages.jsx b/src/pages/Messages.jsx index bbefeb7..3a36515 100644 --- a/src/pages/Messages.jsx +++ b/src/pages/Messages.jsx @@ -6,7 +6,7 @@ import {Subscribe} from '../services/signalr' import Loader from '../components/Loader' import moment from 'moment' import '../styles/message.css' -import Notification from '../components/Notification' +import notify from '../components/notify' const {Option} = Select @@ -77,7 +77,7 @@ export default function Messages() { MessageService.getMessage(id) .then(handleReceiveMessages) .catch((ex) => { - Notification(`Не удалось загрузить сообщения по скважине "${id}"`, 'error') + notify(`Не удалось загрузить сообщения по скважине "${id}"`, 'error') console.log(ex) }) diff --git a/src/pages/TelemetryView.jsx b/src/pages/TelemetryView.jsx index 6b10633..9bdf2e6 100644 --- a/src/pages/TelemetryView.jsx +++ b/src/pages/TelemetryView.jsx @@ -12,7 +12,7 @@ import moment from 'moment' import {Subscribe} from '../services/signalr' import {DataService, MessageService} from '../services/api' import '../styles/message.css' -import Notification from "../components/Notification"; +import notify from "../components/notify"; const {Option} = Select @@ -207,14 +207,14 @@ export default function TelemetryView(props) { DataService.getData(id) .then(handleReceiveDataSaub) .catch((ex) => { - Notification(`Не удалось загрузить данные по скважине "${id}"`, 'error') + notify(`Не удалось загрузить данные по скважине "${id}"`, 'error') console.log(ex) }) MessageService.getMessage(id) .then(handleReceiveMessages) .catch((ex) => { - Notification(`Не удалось загрузить сообщения по скважине "${id}"`, 'error') + notify(`Не удалось загрузить сообщения по скважине "${id}"`, 'error') console.log(ex) })