Remove browsing selection ceilings
This commit is contained in:
1 parent
c028637556
commit
bc42c55555
14 files changed
+81
-53
No files matched your search
@@ -193,10 +193,10 @@ function BrowsingSimulationSection({ account }: { account: GrowthAccountDetail }
|
||||
const dailyRangeValid = Number.isInteger(parsedDailyMinimum)
|
||||
&& Number.isInteger(parsedDailyMaximum)
|
||||
&& parsedDailyMinimum >= 1
|
||||
&& parsedDailyMaximum <= 12
|
||||
&& parsedDailyMaximum >= 1
|
||||
&& parsedDailyMinimum <= parsedDailyMaximum;
|
||||
const dailyRangeError = dailyMinimum !== '' && dailyMaximum !== '' && !dailyRangeValid
|
||||
? 'Use a range from 1 to 12, with the minimum no greater than the maximum.'
|
||||
? 'Use positive whole numbers, with the minimum no greater than the maximum.'
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
@@ -233,7 +233,6 @@ function BrowsingSimulationSection({ account }: { account: GrowthAccountDetail }
|
||||
hint="The system chooses one stable target inside this range for each account and local day."
|
||||
label="Daily minimum"
|
||||
min={1}
|
||||
max={12}
|
||||
name="browsing-daily-minimum"
|
||||
onChange={setDailyMinimum}
|
||||
suffix="/day"
|
||||
@@ -243,7 +242,6 @@ function BrowsingSimulationSection({ account }: { account: GrowthAccountDetail }
|
||||
error={dailyRangeError}
|
||||
label="Daily maximum"
|
||||
min={1}
|
||||
max={12}
|
||||
name="browsing-daily-maximum"
|
||||
onChange={setDailyMaximum}
|
||||
suffix="/day"
|
||||
@@ -291,7 +289,6 @@ function BrowsingSimulationSection({ account }: { account: GrowthAccountDetail }
|
||||
hint="Maximum eligible posts or comments selected by each scheduled or manual session."
|
||||
label="Selections per session"
|
||||
min={1}
|
||||
max={12}
|
||||
name="browsing-selections-per-session"
|
||||
onChange={setSelectionsPerSession}
|
||||
suffix="/session"
|
||||
@@ -302,7 +299,7 @@ function BrowsingSimulationSection({ account }: { account: GrowthAccountDetail }
|
||||
disabled={update.isPending}
|
||||
onClick={() => {
|
||||
const parsed = Number.parseInt(selectionsPerSession, 10);
|
||||
if (Number.isInteger(parsed) && parsed >= 1 && parsed <= 12) {
|
||||
if (Number.isSafeInteger(parsed) && parsed >= 1) {
|
||||
update.mutate({ selectionsPerSession: parsed });
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user