From 2bed34ccd54c778203824dded7ca8e423ba287f5 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Thu, 24 Feb 2022 07:52:45 +0300 Subject: [PATCH] Show helm details fetch errors in Notifications (#4905) Signed-off-by: Alex Andreev --- .../components/+helm-charts/helm-chart-details.tsx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/renderer/components/+helm-charts/helm-chart-details.tsx b/src/renderer/components/+helm-charts/helm-chart-details.tsx index 759a4f8a5c..f88fcdaf00 100644 --- a/src/renderer/components/+helm-charts/helm-chart-details.tsx +++ b/src/renderer/components/+helm-charts/helm-chart-details.tsx @@ -19,6 +19,7 @@ import { Badge } from "../badge"; import { Tooltip, withStyles } from "@material-ui/core"; import { withInjectables } from "@ogre-tools/injectable-react"; import createInstallChartTabInjectable from "../dock/install-chart/create-install-chart-tab.injectable"; +import { Notifications } from "../notifications"; interface Props { chart: HelmChart; @@ -40,7 +41,6 @@ class NonInjectedHelmChartDetails extends Component { @observable chartVersions: HelmChart[]; @observable selectedChart?: HelmChart; @observable readme?: string; - @observable error?: string; private abortController?: AbortController; @@ -67,7 +67,7 @@ class NonInjectedHelmChartDetails extends Component { this.chartVersions = versions; this.selectedChart = versions[0]; } catch (error) { - this.error = error; + Notifications.error(error); this.selectedChart = null; } }, { @@ -89,7 +89,7 @@ class NonInjectedHelmChartDetails extends Component { this.readme = readme; } catch (error) { - this.error = error; + Notifications.error(error); } } @@ -167,14 +167,6 @@ class NonInjectedHelmChartDetails extends Component { } renderContent() { - if (this.error) { - return ( -
-

{this.error}

-
- ); - } - if (!this.selectedChart) { return ; }