From 6338e5878398715eda782aa6305bae75f13dd561 Mon Sep 17 00:00:00 2001 From: Rares Mardare Date: Mon, 3 Oct 2022 17:25:13 +0300 Subject: [PATCH] fix for webhook linter --- .../pages/outgoing_webhooks/OutgoingWebhooks.tsx | 15 ++++++++++----- grafana-plugin/src/pages/schedules/Schedules.tsx | 5 ++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/grafana-plugin/src/pages/outgoing_webhooks/OutgoingWebhooks.tsx b/grafana-plugin/src/pages/outgoing_webhooks/OutgoingWebhooks.tsx index 8ddd846c..51d80e98 100644 --- a/grafana-plugin/src/pages/outgoing_webhooks/OutgoingWebhooks.tsx +++ b/grafana-plugin/src/pages/outgoing_webhooks/OutgoingWebhooks.tsx @@ -60,14 +60,19 @@ class OutgoingWebhooks extends React.Component this.setState({ errorData: { ...getWrongTeamResponseInfo(error) } })); + } - if (outgoingWebhook) { - this.setState({ outgoingWebhookIdToEdit: id }); - } + if (outgoingWebhook || isNewWebhook) { + this.setState({ outgoingWebhookIdToEdit: id }); } }; diff --git a/grafana-plugin/src/pages/schedules/Schedules.tsx b/grafana-plugin/src/pages/schedules/Schedules.tsx index 9493d837..3fb0d618 100644 --- a/grafana-plugin/src/pages/schedules/Schedules.tsx +++ b/grafana-plugin/src/pages/schedules/Schedules.tsx @@ -87,8 +87,8 @@ class SchedulesPage extends React.Component res.id === id)?.id; + scheduleId = schedule.id; } if (scheduleId || isNewSchedule) {