diff --git a/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx b/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx index 51a7ccf531283f2b4d618b353162fadc81ee7868..ea80ef06b19545374b616c440a3a889c363144e7 100644 --- a/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx +++ b/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx @@ -104,17 +104,16 @@ const ProfileTypeFormDateSelection = ({ setNextStep({ ...profileType, [answerType.attribute]: answer }) } - function handleSelectMonth(event: any) { + function handleSelectMonth(value: string) { setSelectedMonth({ - value: event.target.value, - label: getMonthFullName(parseInt(event.target.value)), + value: value, + label: getMonthFullName(parseInt(value)), }) - setAnswer(buildISODate(selectedYear.toString(), event.target.value)) + setAnswer(buildISODate(selectedYear.toString(), value)) } - function handleSelectYear(event: any) { - setSelectedYear(parseInt(event.target.value)) - setAnswer(buildISODate(event.target.value, selectedMonth.value)) + function handleSelectYear(value: string) { + setAnswer(buildISODate(value, selectedMonth.value)) } /** If current year, only show past and present months else show full months */ @@ -139,7 +138,7 @@ const ProfileTypeFormDateSelection = ({ className="month" defaultValue={selectedMonth.value} value={selectedMonth.value} - onChange={e => handleSelectMonth(e)} + onChange={e => handleSelectMonth(e.target.value)} > {renderMonths.map(month => ( <MenuItem @@ -158,7 +157,7 @@ const ProfileTypeFormDateSelection = ({ className="year" defaultValue={selectedYear} value={selectedYear} - onChange={e => handleSelectYear(e)} + onChange={e => handleSelectYear(e.target.value)} > {selectYears.map(year => ( <MenuItem value={year} key={year} className="date-option"> diff --git a/src/models/account.model.ts b/src/models/account.model.ts index bb125bcc9db89a4a5485e39a40b12188d19fd36e..4595f62e3605221e82dcce7791d11d1a8f5528ca 100644 --- a/src/models/account.model.ts +++ b/src/models/account.model.ts @@ -12,7 +12,7 @@ export interface Account extends AccountAttributes { id?: string _rev?: string _type?: string - cozyMetadata?: Record<string, any> + cozyMetadata?: Record<string, unknown> } export interface SgeAccountData { consentId: number