Skip to content

Template settings fixes/kira pilot #3668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 24, 2022
Prev Previous commit
Next Next commit
fix typing
  • Loading branch information
Kira-Pilot committed Aug 24, 2022
commit b7ce0202ca1fc0c62195af7085958552cf5f6502
4 changes: 2 additions & 2 deletions site/src/pages/TemplateSettingsPage/TemplateSettingsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Language = {
ttlMaxError: "Please enter a limit that is less than or equal to 168 hours (7 days).",
descriptionMaxError: "Please enter a description that is less than or equal to 128 characters.",
ttlHelperText: (
ttl?: number,
ttl: number,
): string => `Workspaces created from this template will, by default, shut down ${ttl}
hours after starting.`,
}
Expand Down Expand Up @@ -173,7 +173,7 @@ export const TemplateSettingsForm: FC<TemplateSettingsForm> = ({
variant="outlined"
type="number"
/>
{!form.errors.max_ttl_ms && (
{!form.errors.max_ttl_ms && form.values.max_ttl_ms && (
<Typography variant="subtitle2">
{Language.ttlHelperText(form.values.max_ttl_ms)}
</Typography>
Expand Down