Round numbers so we always see integers in the inputs

[MAILPOET-3763]
This commit is contained in:
Pavel Dohnal
2021-09-21 10:48:45 +02:00
committed by Veljko V
parent 116c8ddb0e
commit 3436d1a1be

View File

@@ -14,7 +14,7 @@ import ListingHeadingStepsRoute from '../../listings/heading_steps_route';
export function NewsletterTypeReEngagement(): JSX.Element {
const [options, setOptions] = useState({
afterTimeNumber: (
(Number(MailPoet.settings.deactivate_subscriber_after_inactive_days) / 30) - 1
(Math.floor(Number(MailPoet.settings.deactivate_subscriber_after_inactive_days) / 30)) - 1
).toString(),
afterTimeType: 'months',
});