diff --git a/src/components/settings.tsx b/src/components/settings.tsx index 07b567d..8348c8c 100644 --- a/src/components/settings.tsx +++ b/src/components/settings.tsx @@ -394,11 +394,12 @@ const Settings = ({ min={0} max={500} placeholder={t('min')} - required={true} - error={!!therapeuticRangeError || !therapeuticRange.min} - errorMessage={formatText(therapeuticRangeError || t('errorTherapeuticRangeMinRequired') || 'Minimum therapeutic range is required')} + required={false} + error={!!therapeuticRangeError} + errorMessage={formatText(therapeuticRangeError)} showResetButton={true} defaultValue={defaultsForT.therapeuticRangeMin} + allowEmpty={true} /> - diff --git a/src/components/simulation-chart.tsx b/src/components/simulation-chart.tsx index d6983c7..94eee0a 100644 --- a/src/components/simulation-chart.tsx +++ b/src/components/simulation-chart.tsx @@ -638,20 +638,20 @@ const SimulationChart = React.memo(({ /> ); })} - {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && ( + {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.min && !isNaN(parseFloat(therapeuticRange.min)) && ( )} - {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && ( + {showTherapeuticRange && (chartView === 'damph' || chartView === 'both') && therapeuticRange.max && !isNaN(parseFloat(therapeuticRange.max)) && (