Skip to content

Commit 23528ca

Browse files
committed
pr review
1 parent 881c71c commit 23528ca

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
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: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,20 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
100100
error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATES_ERROR]}
101101
/>
102102
) : (
103-
<></>
103+
null
104104
)}
105105
{props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATE_SCHEMA_ERROR] ? (
106106
<ErrorSummary
107107
error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_TEMPLATE_SCHEMA_ERROR]}
108108
/>
109109
) : (
110-
<></>
110+
null
111111
)}
112112
</Stack>
113113
)
114114
}
115115

116-
const canSubmit =
117-
props.quota && props.quota.user_workspace_limit > 0
118-
? props.quota.user_workspace_count < props.quota.user_workspace_limit
119-
: true
116+
const canSubmit = props.quota && props.quota.user_workspace_limit > 0 && props.quota.user_workspace_count < props.quota.user_workspace_limit
120117

121118
return (
122119
<FullPageForm title="Create workspace" onCancel={props.onCancel}>
@@ -127,7 +124,7 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
127124
error={props.createWorkspaceErrors[CreateWorkspaceErrors.CREATE_WORKSPACE_ERROR]}
128125
/>
129126
) : (
130-
<></>
127+
null
131128
)}
132129
<TextField
133130
disabled
@@ -176,7 +173,7 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
176173
}
177174
/>
178175
) : (
179-
<></>
176+
null
180177
)}
181178

182179
<FormFooter

0 commit comments

Comments
 (0)