From b5aa68cb0035f2ca1587604ce147e11dc10dd9d9 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 12 Sep 2024 23:02:49 +0530 Subject: [PATCH] refactor: better variable names --- src/components/molecules/ScheduleSettings.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/molecules/ScheduleSettings.tsx b/src/components/molecules/ScheduleSettings.tsx index 262255a5..694bb6d9 100644 --- a/src/components/molecules/ScheduleSettings.tsx +++ b/src/components/molecules/ScheduleSettings.tsx @@ -32,13 +32,13 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche setSettings(prev => ({ ...prev, [field]: value })); }; - const commonStyle = { + const textStyle = { width: '150px', height: '50px', marginRight: '10px', }; - const commonDStyle = { + const dropDownStyle = { marginTop: '2px', width: '150px', height: '59px', @@ -66,14 +66,14 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche type="number" value={settings.runEvery} onChange={(e) => handleChange('runEvery', parseInt(e.target.value))} - sx={commonStyle} + sx={textStyle} /> handleChange('runEveryUnit', e.target.value)} - sx={commonDStyle} + sx={dropDownStyle} > minutes hours @@ -90,7 +90,7 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche id="startFrom" value={settings.startFrom} handleSelect={(e) => handleChange('startFrom', e.target.value)} - sx={commonDStyle} + sx={dropDownStyle} > Monday Tuesday @@ -109,7 +109,7 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche type="time" value={settings.atTime} onChange={(e) => handleChange('atTime', e.target.value)} - sx={commonStyle} + sx={textStyle} /> @@ -119,7 +119,7 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche id="timezone" value={settings.timezone} handleSelect={(e) => handleChange('timezone', e.target.value)} - sx={commonDStyle} + sx={dropDownStyle} > UTC America/New_York @@ -133,7 +133,7 @@ export const ScheduleSettingsModal = ({ isOpen, handleStart, handleClose }: Sche