Skip to content

Commit

Permalink
Use signatureCollectionStatus constants
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Dec 2, 2021
1 parent 6a09a90 commit f7710d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { signatureCollectionStatus } from '@constants';
import { useTheme } from '@utils/theme';
import { removeSearchParamsFromUrl } from '@utils/searchParams';
import { PrimaryButton, SecondaryButton } from '@toolbox/buttons';
Expand Down Expand Up @@ -46,7 +47,7 @@ export const Feedback = ({
direction="horizontal"
className={styles.footer}
>
<div className={`${styles.feedback} ${signatureStatus === 'occupiedByOptionals' ? styles.warning : styles.error} feedback`}>
<div className={`${styles.feedback} ${signatureStatus === signatureCollectionStatus.occupiedByOptionals ? styles.warning : styles.error} feedback`}>
<span>{feedback}</span>
</div>
</BoxFooter>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useMemo } from 'react';
import { isEmpty } from '@utils/helpers';
import { signatureCollectionStatus } from '@constants';
import BoxContent from '@toolbox/box/content';
import Box from '@toolbox/box';
import TransactionDetails from '@screens/transactionDetails/transactionDetails';
Expand Down Expand Up @@ -40,11 +41,13 @@ const Summary = ({
};

const nextButton = {
title: signatureStatus === 'fullySigned' ? t('Continue') : t('Sign'),
title: signatureStatus === signatureCollectionStatus.fullySigned ? t('Continue') : t('Sign'),
onClick,
};

const showFeedback = !isMember || signatureStatus === 'fullySigned' || signatureStatus === 'occupiedByOptionals';
const showFeedback = !isMember
|| signatureStatus === signatureCollectionStatus.fullySigned
|| signatureStatus === signatureCollectionStatus.occupiedByOptionals;

if (isEmpty(senderAccount.data)) {
return <div />;
Expand Down

0 comments on commit f7710d7

Please sign in to comment.