From b48b3bfa496a1869fabf789246410292edad81eb Mon Sep 17 00:00:00 2001
From: Bastien DUMONT <bdumont@grandlyon.com>
Date: Wed, 9 Oct 2024 16:57:23 +0200
Subject: [PATCH] chore: fix types errors

---
 src/components/Action/ActionList/ActionList.tsx               | 2 ++
 .../ProfileTypeFormDateSelection.tsx                          | 4 ++--
 src/store/profile/profile.slice.ts                            | 1 +
 tests/__mocks__/store/profile.state.mock.ts                   | 1 +
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/components/Action/ActionList/ActionList.tsx b/src/components/Action/ActionList/ActionList.tsx
index b400d9d86..0b35b952d 100644
--- a/src/components/Action/ActionList/ActionList.tsx
+++ b/src/components/Action/ActionList/ActionList.tsx
@@ -57,6 +57,8 @@ const ActionList = ({
       </div>
     )
   }
+
+  return null
 }
 
 export default ActionList
diff --git a/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx b/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx
index ea80ef06b..796d8ca02 100644
--- a/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx
+++ b/src/components/ProfileType/ProfileTypeFormDateSelection/ProfileTypeFormDateSelection.tsx
@@ -138,7 +138,7 @@ const ProfileTypeFormDateSelection = ({
                 className="month"
                 defaultValue={selectedMonth.value}
                 value={selectedMonth.value}
-                onChange={e => handleSelectMonth(e.target.value)}
+                onChange={e => handleSelectMonth(e.target.value as string)}
               >
                 {renderMonths.map(month => (
                   <MenuItem
@@ -157,7 +157,7 @@ const ProfileTypeFormDateSelection = ({
                 className="year"
                 defaultValue={selectedYear}
                 value={selectedYear}
-                onChange={e => handleSelectYear(e.target.value)}
+                onChange={e => handleSelectYear(e.target.value as string)}
               >
                 {selectYears.map(year => (
                   <MenuItem value={year} key={year} className="date-option">
diff --git a/src/store/profile/profile.slice.ts b/src/store/profile/profile.slice.ts
index c2d5c3a5c..876c44ab3 100644
--- a/src/store/profile/profile.slice.ts
+++ b/src/store/profile/profile.slice.ts
@@ -32,6 +32,7 @@ const initialState: Profile = {
   }),
   haveSeenLastAnalysis: true,
   sendAnalysisNotification: true,
+  isAnalysisReminderEnabled: false,
   sendConsumptionAlert: false,
   waterDailyConsumptionLimit: 0,
   mailToken: '',
diff --git a/tests/__mocks__/store/profile.state.mock.ts b/tests/__mocks__/store/profile.state.mock.ts
index cb896d683..0f030bbb6 100644
--- a/tests/__mocks__/store/profile.state.mock.ts
+++ b/tests/__mocks__/store/profile.state.mock.ts
@@ -24,6 +24,7 @@ export const mockProfileState: Profile = {
     zone: 'utc',
   }),
   haveSeenLastAnalysis: true,
+  isAnalysisReminderEnabled: false,
   sendConsumptionAlert: false,
   waterDailyConsumptionLimit: 0,
   sendAnalysisNotification: true,
-- 
GitLab