From 8096c8545bfb55937b8cc9c28bfbbf3f4ebec0bc Mon Sep 17 00:00:00 2001 From: fc-santos Date: Wed, 2 Oct 2024 16:22:30 -0400 Subject: [PATCH] fix: ajout de condition pour afficher/cacher le bouton Signed-off-by: fc-santos --- app/src/components/AddCredentialButton.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/components/AddCredentialButton.tsx b/app/src/components/AddCredentialButton.tsx index a6cbaea3..1d2334f8 100644 --- a/app/src/components/AddCredentialButton.tsx +++ b/app/src/components/AddCredentialButton.tsx @@ -1,11 +1,11 @@ -import { testIdWithKey, Button, ButtonType } from '@hyperledger/aries-bifold-core' +import { testIdWithKey, Button, ButtonType, CredentialListFooterProps } from '@hyperledger/aries-bifold-core' import React, { useCallback } from 'react' import { useTranslation } from 'react-i18next' import { View, DeviceEventEmitter, StyleSheet } from 'react-native' import { BCWalletEventTypes } from '../events/eventTypes' -const AddCredentialButton = () => { +const AddCredentialButton: React.FC = ({ credentialsCount }) => { const { t } = useTranslation() const activateSlider = useCallback(() => { @@ -19,7 +19,7 @@ const AddCredentialButton = () => { }, }) - return ( + return credentialsCount > 0 ? (