Merge branch '19786-Links-on-inactive-user-screen-are-not-clickable' into main
[arvados-workbench2.git] / src / store / link-panel / link-panel-actions.ts
index 7cbc507342cd3b301035852f71b989a36837d4be..52ac6a211e104b4ec52efec88a473141969d6274 100644 (file)
@@ -3,14 +3,14 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { Dispatch } from 'redux';
-import { RootState } from '~/store/store';
-import { ServiceRepository } from '~/services/services';
-import { bindDataExplorerActions } from '~/store/data-explorer/data-explorer-action';
-import { setBreadcrumbs } from '~/store/breadcrumbs/breadcrumbs-actions';
-import { dialogActions } from '~/store/dialog/dialog-actions';
-import { LinkResource } from '~/models/link';
-import { getResource } from '~/store/resources/resources';
-import { snackbarActions } from '~/store/snackbar/snackbar-actions';
+import { RootState } from 'store/store';
+import { ServiceRepository } from 'services/services';
+import { bindDataExplorerActions } from 'store/data-explorer/data-explorer-action';
+import { setBreadcrumbs } from 'store/breadcrumbs/breadcrumbs-actions';
+import { dialogActions } from 'store/dialog/dialog-actions';
+import { LinkResource } from 'models/link';
+import { getResource } from 'store/resources/resources';
+import {snackbarActions, SnackbarKind} from 'store/snackbar/snackbar-actions';
 
 export const LINK_PANEL_ID = "linkPanelId";
 export const linkPanelActions = bindDataExplorerActions(LINK_PANEL_ID);
@@ -46,11 +46,11 @@ export const openLinkRemoveDialog = (uuid: string) =>
 
 export const removeLink = (uuid: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
-        dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removing ...' }));
+        dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Removing ...', kind: SnackbarKind.INFO }));
         try {
             await services.linkService.delete(uuid);
             dispatch(linkPanelActions.REQUEST_ITEMS());
-            dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Link has been successfully removed.', hideDuration: 2000 }));
+            dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Link has been successfully removed.', hideDuration: 2000, kind: SnackbarKind.SUCCESS }));
         } catch (e) {
             return;
         }