From 626469caaa8b060f79f101cffff214d23c7e611b Mon Sep 17 00:00:00 2001
From: Wouter Admiraal <wouter.admiraal@sonarsource.com>
Date: Mon, 14 Sep 2020 15:40:23 +0200
Subject: Update background task related types

---
 .../main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx')

diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
index c0da78bb3cc..3454c4c7464 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
@@ -24,11 +24,12 @@ import { Alert } from 'sonar-ui-common/components/ui/Alert';
 import { hasMessage, translate } from 'sonar-ui-common/helpers/l10n';
 import { STATUSES } from '../../../../apps/background-tasks/constants';
 import { getComponentBackgroundTaskUrl } from '../../../../helpers/urls';
+import { Task, TaskStatuses } from '../../../../types/tasks';
 import ComponentNavLicenseNotif from './ComponentNavLicenseNotif';
 
 interface Props {
   component: T.Component;
-  currentTask?: T.Task;
+  currentTask?: Task;
   currentTaskOnSameBranch?: boolean;
   isInProgress?: boolean;
   isPending?: boolean;
@@ -79,7 +80,7 @@ export default class ComponentNavBgTaskNotif extends React.PureComponent<Props>
           {this.renderMessage('component_navigation.status.pending', STATUSES.ALL)}
         </Alert>
       );
-    } else if (currentTask && currentTask.status === STATUSES.FAILED) {
+    } else if (currentTask && currentTask.status === TaskStatuses.Failed) {
       if (
         currentTask.errorType &&
         hasMessage('license.component_navigation.button', currentTask.errorType)
-- 
cgit v1.2.3

