From a22b29ad6d495ed965b69a71c6709de6a905c0db Mon Sep 17 00:00:00 2001 From: mantikoros Date: Thu, 7 Jul 2022 12:36:34 -0400 Subject: [PATCH] create: remove automatic setting of log scale --- web/pages/create.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index df83fb9f..f26d5687 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -149,14 +149,6 @@ export function NewContract(props: { ? parseFloat(initialValueString) : undefined - const adjustIsLog = () => { - if (min === undefined || max === undefined) return - const lengthDiff = Math.log10(max - min) - if (lengthDiff > 2) { - setIsLogScale(true) - } - } - // get days from today until the end of this year: const daysLeftInTheYear = dayjs().endOf('year').diff(dayjs(), 'day') @@ -279,7 +271,6 @@ export function NewContract(props: { placeholder="MIN" onClick={(e) => e.stopPropagation()} onChange={(e) => setMinString(e.target.value)} - onBlur={adjustIsLog} min={Number.MIN_SAFE_INTEGER} max={Number.MAX_SAFE_INTEGER} disabled={isSubmitting} @@ -291,7 +282,6 @@ export function NewContract(props: { placeholder="MAX" onClick={(e) => e.stopPropagation()} onChange={(e) => setMaxString(e.target.value)} - onBlur={adjustIsLog} min={Number.MIN_SAFE_INTEGER} max={Number.MAX_SAFE_INTEGER} disabled={isSubmitting}