Skip to content

Commit

Permalink
refactor: prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoMolinari95 committed Dec 23, 2024
1 parent aa53709 commit a0f6f55
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export const ItwEidLifecycleAlert = ({
date: format(eid.jwt.expiration, "DD-MM-YYYY")
}
),
action: I18n.t("features.itWallet.presentation.bottomSheets.eidInfo.alert.action"),
action: I18n.t(
"features.itWallet.presentation.bottomSheets.eidInfo.alert.action"
),
onPress: startEidReissuing
},
jwtExpired: {
Expand All @@ -96,7 +98,9 @@ export const ItwEidLifecycleAlert = ({
content: I18n.t(
"features.itWallet.presentation.bottomSheets.eidInfo.alert.expired"
),
action: I18n.t("features.itWallet.presentation.bottomSheets.eidInfo.alert.action"),
action: I18n.t(
"features.itWallet.presentation.bottomSheets.eidInfo.alert.action"
),
onPress: startEidReissuing
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ import { isCIEAuthenticationSupportedSelector } from "../../machine/eid/selector
import { Route, useRoute } from "@react-navigation/native";
import { ITW_ROUTES } from "../../navigation/routes";

export type ItwIdentificationModeSelectionScreenNavigationParams = {
eidReissuing?: boolean;
} | undefined;
export type ItwIdentificationModeSelectionScreenNavigationParams =
| {
eidReissuing?: boolean;
}
| undefined;

export const ItwIdentificationModeSelectionScreen = () => {
const machineRef = ItwEidIssuanceMachineContext.useActorRef();
Expand Down Expand Up @@ -59,7 +61,6 @@ export const ItwIdentificationModeSelectionScreen = () => {
>
>();


const { eidReissuing } = route.params || {};

useFocusEffect(
Expand Down
2 changes: 1 addition & 1 deletion ts/features/itwallet/machine/credential/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default (
cred = {
...cred,
jwt: {
expiration: '2024-12-22T23:59:59Z',
expiration: "2024-12-22T23:59:59Z"
}
};

Expand Down
2 changes: 1 addition & 1 deletion ts/features/itwallet/machine/eid/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export const createEidIssuanceActionsImplementation = (
eid = {
...eid,
jwt: {
expiration: '2024-12-22T23:59:59Z',
expiration: "2024-12-22T23:59:59Z"
}
};
store.dispatch(itwCredentialsStore([eid]));
Expand Down
10 changes: 5 additions & 5 deletions ts/features/itwallet/machine/eid/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const itwEidIssuanceMachine = setup({
setIsReissuing: assign(({ context }) => ({
...context,
isReissuing: true
})),
}))
},
actors: {
createWalletInstance: fromPromise<string>(notImplemented),
Expand Down Expand Up @@ -127,7 +127,7 @@ export const itwEidIssuanceMachine = setup({
"revoke-wallet-instance": {
target: "WalletInstanceRevocation"
},
'start-reissuing': {
"start-reissuing": {
target: "UserIdentification",
actions: "setIsReissuing"
}
Expand Down Expand Up @@ -289,7 +289,7 @@ export const itwEidIssuanceMachine = setup({
target: "#itwEidIssuanceMachine.Idle"
},
{
target: "#itwEidIssuanceMachine.IpzsPrivacyAcceptance",
target: "#itwEidIssuanceMachine.IpzsPrivacyAcceptance"
}
]
}
Expand Down Expand Up @@ -573,12 +573,12 @@ export const itwEidIssuanceMachine = setup({
on: {
"add-to-wallet": [
{
guard: "isReissuing",
guard: "isReissuing",
actions: [
"storeEidCredential",
"setWalletInstanceToValid",
"trackWalletInstanceCreation",
"navigateToWallet"
"navigateToWallet"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion ts/features/itwallet/navigation/ItwParamsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export type ItwParamsList = {
[ITW_ROUTES.DISCOVERY.IPZS_PRIVACY]: undefined;
[ITW_ROUTES.DISCOVERY.ALREADY_ACTIVE_SCREEN]: undefined;
// IDENTIFICATION
[ITW_ROUTES.IDENTIFICATION.MODE_SELECTION]: ItwIdentificationModeSelectionScreenNavigationParams;
[ITW_ROUTES.IDENTIFICATION
.MODE_SELECTION]: ItwIdentificationModeSelectionScreenNavigationParams;
// IDENTIFICATION SPID
[ITW_ROUTES.IDENTIFICATION.IDP_SELECTION]: undefined;
[ITW_ROUTES.IDENTIFICATION.SPID.LOGIN]: undefined;
Expand Down
2 changes: 1 addition & 1 deletion ts/features/itwallet/navigation/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const ITW_ROUTES = {
CREDENTIAL_CARD_MODAL: "ITW_PRESENTATION_CREDENTIAL_CARD_MODAL",
CREDENTIAL_FISCAL_CODE_MODAL:
"ITW_PRESENTATION_CREDENTIAL_FISCAL_CODE_MODAL",
EID_VERIFICATION_EXPIRED: "ITW_PRESENTATION_EID_VERIFICATION_EXPIRED",
EID_VERIFICATION_EXPIRED: "ITW_PRESENTATION_EID_VERIFICATION_EXPIRED"
} as const,
PLAYGROUNDS: "ITW_PLAYGROUNDS" as const,
IDENTITY_NOT_MATCHING_SCREEN: "ITW_IDENTITY_NOT_MATCHING_SCREEN" as const,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,26 @@ export const ItwPresentationEidVerificationExpiredScreen = () => {
const bodyPropsArray: Array<BodyProps> = useMemo(
() => [
{
text: I18n.t("features.itWallet.presentation.eid.verificationExpired.contentStart"),
text: I18n.t(
"features.itWallet.presentation.eid.verificationExpired.contentStart"
),
style: {
textAlign: "center"
}
},
{
text: I18n.t("features.itWallet.presentation.eid.verificationExpired.contentBold"),
text: I18n.t(
"features.itWallet.presentation.eid.verificationExpired.contentBold"
),
style: {
textAlign: "center",
fontWeight: "bold"
}
},
{
text: I18n.t("features.itWallet.presentation.eid.verificationExpired.contentEnd"),
text: I18n.t(
"features.itWallet.presentation.eid.verificationExpired.contentEnd"
),
style: {
textAlign: "center"
}
Expand Down

0 comments on commit a0f6f55

Please sign in to comment.