/ src / components / transactions / GovDelegation / GovDelegationModal.tsx
GovDelegationModal.tsx
 1  import React from 'react';
 2  import { ModalType, useModalContext } from 'src/hooks/useModal';
 3  
 4  import { BasicModal } from '../../primitives/BasicModal';
 5  import { GovDelegationModalContent } from './GovDelegationModalContent';
 6  
 7  export const GovDelegationModal = () => {
 8    const { type, close } = useModalContext();
 9    return (
10      <BasicModal
11        open={type === ModalType.GovDelegation || type === ModalType.RevokeGovDelegation}
12        setOpen={close}
13      >
14        <GovDelegationModalContent
15          type={
16            type === ModalType.GovDelegation ? ModalType.GovDelegation : ModalType.RevokeGovDelegation
17          }
18        />
19      </BasicModal>
20    );
21  };