diff --git a/ts/features/it-wallet/hooks/useItwDataProcessing.tsx b/ts/features/it-wallet/hooks/useItwDataProcessing.tsx deleted file mode 100644 index 50b9d24e7ba..00000000000 --- a/ts/features/it-wallet/hooks/useItwDataProcessing.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import * as React from "react"; -import { View } from "react-native"; -import { Body, H6, VSpacer } from "@pagopa/io-app-design-system"; -import { useIOBottomSheetModal } from "../../../utils/hooks/bottomSheet"; -import { IOStyles } from "../../../components/core/variables/IOStyles"; -import I18n from "../../../i18n"; - -/** - * A hook that returns a function to present an info bottom sheet - * related to the data processing of the credentials issuing - * @deprecated - */ -export const useItwDataProcessing = () => { - const BottomSheetBody = () => ( - -
- {I18n.t( - "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.firstHeaderTitle" - )} -
- - - {I18n.t( - "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.firstBodyContent" - )} - - -
- {I18n.t( - "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.secondHeaderTitle" - )} -
- - - {I18n.t( - "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.secondBodyContent" - )} - -
- ); - const { present, bottomSheet, dismiss } = useIOBottomSheetModal({ - title: I18n.t( - "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.title" - ), - component: , - snapPoint: [350] - }); - - return { - dismiss, - present, - bottomSheet - }; -}; diff --git a/ts/features/it-wallet/screens/credential/issuing/ItwCredentialAuthScreen.tsx b/ts/features/it-wallet/screens/credential/issuing/ItwCredentialAuthScreen.tsx index bf83d7ddd1c..51e07b18d37 100644 --- a/ts/features/it-wallet/screens/credential/issuing/ItwCredentialAuthScreen.tsx +++ b/ts/features/it-wallet/screens/credential/issuing/ItwCredentialAuthScreen.tsx @@ -25,7 +25,6 @@ import { IOStackNavigationProp } from "../../../../../navigation/params/AppParam import { ItwParamsList } from "../../../navigation/ItwParamsList"; import I18n from "../../../../../i18n"; import ItwBulletList from "../../../components/ItwBulletList"; -import { useItwDataProcessing } from "../../../hooks/useItwDataProcessing"; import { CREDENTIAL_ISSUER, getRequestedClaims } from "../../../utils/mocks"; import { showCancelAlert } from "../../../utils/alert"; import ROUTES from "../../../../../navigation/routes"; @@ -33,6 +32,7 @@ import { ITW_ROUTES } from "../../../navigation/ItwRoutes"; import ItwKoView from "../../../components/ItwKoView"; import { getItwGenericMappedError } from "../../../utils/errors/itwErrorsMapping"; import ItwTextInfo from "../../../components/ItwTextInfo"; +import { useItwInfoBottomSheet } from "../../../hooks/useItwInfoBottomSheet"; /** * This screen displays the information about the credential that is going to be shared @@ -41,8 +41,30 @@ import ItwTextInfo from "../../../components/ItwTextInfo"; const ItwCredentialAuthScreen = () => { const decodedPid = useIOSelector(itwDecodedPidValueSelector); const navigation = useNavigation>(); - const { present, bottomSheet } = useItwDataProcessing(); const toast = useIOToast(); + const { present, bottomSheet } = useItwInfoBottomSheet({ + title: I18n.t( + "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.title" + ), + content: [ + { + title: I18n.t( + "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.firstHeaderTitle" + ), + body: I18n.t( + "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.firstBodyContent" + ) + }, + { + title: I18n.t( + "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.secondHeaderTitle" + ), + body: I18n.t( + "features.itWallet.issuing.credentialsIssuingInfoScreen.infoBottomSheet.body.secondBodyContent" + ) + } + ] + }); /** * Callback to be used in case of cancel button press alert to navigate to the home screen and show a toast.