From: Stephen Smith Date: Mon, 14 Mar 2022 21:00:28 +0000 (-0400) Subject: 18559: Remove unused actions X-Git-Tag: 2.4.0~1^2~31 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/888c698aa77e4cfdeb346bed8995ba0ec2c17a08 18559: Remove unused actions Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/src/store/my-account/my-account-panel-actions.ts b/src/store/my-account/my-account-panel-actions.ts deleted file mode 100644 index 9e974aa9..00000000 --- a/src/store/my-account/my-account-panel-actions.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) The Arvados Authors. All rights reserved. -// -// SPDX-License-Identifier: AGPL-3.0 - -import { Dispatch } from "redux"; -import { RootState } from "store/store"; -import { initialize } from "redux-form"; -import { ServiceRepository } from "services/services"; -import { setBreadcrumbs } from "store/breadcrumbs/breadcrumbs-actions"; -import { authActions } from "store/auth/auth-action"; -import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions"; - -export const MY_ACCOUNT_FORM = 'myAccountForm'; - -export const loadMyAccountPanel = () => - (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { - dispatch(setBreadcrumbs([{ label: 'User profile' }])); - }; - -export const saveEditedUser = (resource: any) => - async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { - try { - await services.userService.update(resource.uuid, resource); - dispatch(authActions.USER_DETAILS_SUCCESS(resource)); - dispatch(initialize(MY_ACCOUNT_FORM, resource)); - dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Profile has been updated.", hideDuration: 2000, kind: SnackbarKind.SUCCESS })); - } catch (e) { - return; - } - };