Skip to content

Commit 3f09989

Browse files
committed
pr review
1 parent 5e66175 commit 3f09989

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

site/src/components/WorkspaceQuota/WorkspaceQuota.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const WorkspaceQuota: FC<WorkspaceQuotaProps> = ({ quota, error }) => {
5151

5252
// don't show if limit is 0, this means the feature is disabled.
5353
if (quota.user_workspace_limit === 0) {
54-
return <></>
54+
return null
5555
}
5656

5757
let value = Math.round((quota.user_workspace_count / quota.user_workspace_limit) * 100)

site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,20 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
103103
error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATES_ERROR]}
104104
/>
105105
) : (
106-
<></>
106+
null
107107
)}
108108
{props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATE_SCHEMA_ERROR] ? (
109109
<ErrorSummary
110110
error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATE_SCHEMA_ERROR]}
111111
/>
112112
) : (
113-
<></>
113+
null
114114
)}
115115
</Stack>
116116
)
117117
}
118118

119-
const canSubmit =
120-
props.quota && props.quota.user_workspace_limit > 0
121-
? props.quota.user_workspace_count < props.quota.user_workspace_limit
122-
: true
119+
const canSubmit = props.quota && props.quota.user_workspace_limit > 0 && props.quota.user_workspace_count < props.quota.user_workspace_limit
123120

124121
return (
125122
<FullPageForm title="Create workspace" onCancel={props.onCancel}>
@@ -186,7 +183,7 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
186183
}
187184
/>
188185
) : (
189-
<></>
186+
null
190187
)}
191188

192189
<FormFooter

0 commit comments

Comments
 (0)