Skip to content
Prev Previous commit
Next Next commit
yarn lint
  • Loading branch information
johnstcn committed Jun 14, 2022
commit 3999661ed654cd10a972ba3b36aadfa36aaf5250
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { useFormik } from "formik"
import { FC } from "react"
import * as Yup from "yup"
import { FieldErrors } from "../../api/errors"
import { Workspace } from "../../api/typesGenerated"
import { getFormHelpers } from "../../util/formUtils"
import { FormFooter } from "../FormFooter/FormFooter"
import { FullPageForm } from "../FullPageForm/FullPageForm"
Expand Down Expand Up @@ -58,10 +57,8 @@ export interface WorkspaceScheduleFormProps {
fieldErrors?: FieldErrors
initialValues?: WorkspaceScheduleFormValues
isLoading: boolean
now?: dayjs.Dayjs
onCancel: () => void
onSubmit: (values: WorkspaceScheduleFormValues) => void
workspace: Workspace
}

export interface WorkspaceScheduleFormValues {
Expand Down Expand Up @@ -184,10 +181,8 @@ export const WorkspaceScheduleForm: FC<WorkspaceScheduleFormProps> = ({
fieldErrors,
initialValues = defaultWorkspaceSchedule(),
isLoading,
now = dayjs(),
onCancel,
onSubmit,
workspace,
}) => {
const styles = useStyles()

Expand Down Expand Up @@ -285,8 +280,9 @@ export const ttlShutdownAt = (formTTL: number): string => {
if (formTTL === 0) {
return Language.ttlCausesNoShutdownHelperText
} else {
return `${Language.ttlCausesShutdownHelperText} ${dayjs.duration(formTTL, "hours").humanize()} ${Language.ttlCausesShutdownAfterStart
}.`
return `${Language.ttlCausesShutdownHelperText} ${dayjs.duration(formTTL, "hours").humanize()} ${
Language.ttlCausesShutdownAfterStart
}.`
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ export const WorkspaceSchedulePage: React.FC = () => {
} else if (scheduleState.matches("presentForm") || scheduleState.matches("submittingSchedule")) {
return (
<WorkspaceScheduleForm
workspace={workspace}
fieldErrors={formErrors}
initialValues={workspaceToInitialValues(workspace, dayjs.tz.guess())}
isLoading={scheduleState.tags.has("loading")}
Expand Down