mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
refactor: Improve code formatting for better readability in StartAndEndDate and Input components
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user