From b22263ae0cce164b3d1ca48530aae3996889493f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com>
Date: Mon, 2 Oct 2023 15:38:48 +0200
Subject: [PATCH] fix(pop-up): end date selection in hours

---
 src/components/Popups/Popups.tsx | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/components/Popups/Popups.tsx b/src/components/Popups/Popups.tsx
index d85f8870..cc2cd407 100644
--- a/src/components/Popups/Popups.tsx
+++ b/src/components/Popups/Popups.tsx
@@ -61,7 +61,7 @@ const Popups: React.FC = () => {
     endDate: DateTime.local().toISO(),
   })
   const [popupDuration, setPopupDuration] = useState<PopupDuration>({
-    type: 'days',
+    type: durationEnum.hours,
     duration: 0,
   })
 
@@ -353,7 +353,6 @@ const Popups: React.FC = () => {
                 <div>
                   <FormControl style={{ flexDirection: 'row', gap: '1rem' }}>
                     <NativeSelect
-                      defaultValue={30}
                       inputProps={{
                         name: 'age',
                         id: 'uncontrolled-native',
@@ -361,11 +360,7 @@ const Popups: React.FC = () => {
                       onChange={event => handleSelectChange(event)}
                     >
                       {OPTIONS.map(option => (
-                        <option
-                          key={option.value}
-                          value={option.value}
-                          selected={popupDuration.type === option.value}
-                        >
+                        <option key={option.value} value={option.value}>
                           {option.label}
                         </option>
                       ))}
-- 
GitLab