Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #89 from scale8/redirect-after-ownership-tranfer
Browse files Browse the repository at this point in the history
Redirect to user list after ownership transfer
  • Loading branch information
cwbeck authored May 24, 2022
2 parents 79facd6 + b049ca5 commit a74c0e4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ui/src/dialogPages/global/OrgTransferOwnership.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ import { FormValidationResult } from '../../hooks/form/useFormValidation';
import { ApolloError } from '@apollo/client/errors';
import OrgTransferOwnershipForm from '../../components/organisms/Forms/OrgTransferOwnershipForm';
import { DialogPreloadForm, DialogPreloadFormProps } from '../abstractions/DialogPreloadForm';
import { toOrg } from '../../utils/NavigationPaths';
import { useRouter } from 'next/router';

const OrgTransferOwnership: FC<DialogPageProps> = (props: DialogPageProps) => {
const duplicateProps: DialogPreloadFormProps<
const router = useRouter();

const transferProps: DialogPreloadFormProps<
OrgTransferOwnershipGetData,
OrgTransferOwnershipValues,
OrgTransferOwnershipFormProps,
Expand Down Expand Up @@ -64,7 +68,10 @@ const OrgTransferOwnership: FC<DialogPageProps> = (props: DialogPageProps) => {
OrgTransferOwnershipFormProps,
OrgTransferOwnershipResult
>
{...duplicateProps}
{...transferProps}
pageRefresh={() => {
router.push(toOrg({ id: props.id }, 'users')).then();
}}
/>
);
};
Expand Down

0 comments on commit a74c0e4

Please sign in to comment.