Skip to content

Commit

Permalink
fix: [IABT-1515] Fix date format in FCI data sharing screen (#5365)
Browse files Browse the repository at this point in the history
## Short description
This PR updates `FciDataSharingScreen` using a specific function for the
fiscal code birthday rendering. The birthday is an ISO8601 format for
midnight and It returns the date in short format.

## List of changes proposed in this pull request
- Update `FciDataSharingScreen`

## How to test
Using io-dev-api-server to start a signing flow. The birthdate should
show correctly.

Co-authored-by: LazyAfternoons <[email protected]>
  • Loading branch information
hevelius and LazyAfternoons authored Jan 17, 2024
1 parent 599a037 commit a1d2b04
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ts/features/fci/screens/valid/FciDataSharingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { IOStyles } from "../../../../components/core/variables/IOStyles";
import { withValidatedEmail } from "../../../../components/helpers/withValidatedEmail";
import ScreenContent from "../../../../components/screens/ScreenContent";
import { trackFciUserDataConfirmed, trackFciUserExit } from "../../analytics";
import { localeDateFormat } from "../../../../utils/locale";
import { formatFiscalCodeBirthdayAsShortFormat } from "../../../../utils/dates";
import { fciEnvironmentSelector } from "../../store/reducers/fciEnvironment";

const styles = StyleSheet.create({
Expand Down Expand Up @@ -135,10 +135,7 @@ const FciDataSharingScreen = (): React.ReactElement => {
<ListItemComponent
testID="FciDataSharingScreenBirthDateTestID"
title={I18n.t("features.fci.shareDataScreen.birthDate")}
subTitle={localeDateFormat(
birthDate,
I18n.t("global.dateFormats.shortFormat")
)}
subTitle={formatFiscalCodeBirthdayAsShortFormat(birthDate)}
hideIcon
/>
)}
Expand Down

0 comments on commit a1d2b04

Please sign in to comment.