Also, fix the variable names in DurationSelector

This commit is contained in:
Alex Gleason 2023-03-10 15:04:44 -06:00
parent 2b137c12cf
commit bd49417210
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -23,11 +23,11 @@ const DurationSelector = ({ onDurationChange }: IDurationSelector) => {
const value = useMemo(() => {
const now = new Date();
const future = new Date();
now.setUTCDate(now.getUTCDate() + days);
now.setUTCMinutes(now.getUTCMinutes() + minutes);
now.setUTCHours(now.getUTCHours() + hours);
future.setUTCDate(now.getUTCDate() + days);
future.setUTCMinutes(now.getUTCMinutes() + minutes);
future.setUTCHours(now.getUTCHours() + hours);
return Math.round((now.getTime() - future.getTime()) / 1000);
return Math.round((future.getTime() - now.getTime()) / 1000);
}, [days, hours, minutes]);
useEffect(() => {