refactor: Improve code formatting for better readability in StartAndEndDate and Input components

This commit is contained in:
Nawaz Dhandala
2026-01-16 12:16:37 +00:00
parent ddf3dcd8a8
commit 75ca86d92d
2 changed files with 10 additions and 7 deletions

View File

@@ -213,9 +213,10 @@ const StartAndEndDate: DateFilterFunction = (
buttonSize={ButtonSize.Small}
onClick={() => {
// set it to past 1 hour
const endDate: Date = OneUptimeDate.resetSecondsAndMilliseconds(
OneUptimeDate.getCurrentDate(),
);
const endDate: Date =
OneUptimeDate.resetSecondsAndMilliseconds(
OneUptimeDate.getCurrentDate(),
);
const startDate: Date = OneUptimeDate.addRemoveHours(
endDate,
-1,
@@ -237,9 +238,10 @@ const StartAndEndDate: DateFilterFunction = (
buttonSize={ButtonSize.Small}
onClick={() => {
// set it to past 3 hour
const endDate: Date = OneUptimeDate.resetSecondsAndMilliseconds(
OneUptimeDate.getCurrentDate(),
);
const endDate: Date =
OneUptimeDate.resetSecondsAndMilliseconds(
OneUptimeDate.getCurrentDate(),
);
const startDate: Date = OneUptimeDate.addRemoveHours(
endDate,
-3,

View File

@@ -190,7 +190,8 @@ const Input: FunctionComponent<ComponentProps> = (
readOnly={props.readOnly || props.disabled || false}
type={props.type || "text"}
step={
props.type === InputType.DATETIME_LOCAL && props.showSecondsForDateTime
props.type === InputType.DATETIME_LOCAL &&
props.showSecondsForDateTime
? "1"
: undefined
}