Skip to content

Commit c3c7261

Browse files
committed
fmt
1 parent bdce03a commit c3c7261

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

site/src/components/WorkspaceQuota/WorkspaceQuota.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ export const WorkspaceQuota: FC<WorkspaceQuotaProps> = ({ quota, error }) => {
2828
<Box>
2929
<Stack spacing={1} className={styles.stack}>
3030
<span className={styles.title}>Workspace Quota</span>
31-
<ErrorSummary
32-
error={error}
33-
/>
31+
<ErrorSummary error={error} />
3432
</Stack>
3533
</Box>
3634
)

site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.tsx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export enum CreateWorkspaceErrors {
1919
GET_TEMPLATES_ERROR = "getTemplatesError",
2020
GET_TEMPLATE_SCHEMA_ERROR = "getTemplateSchemaError",
2121
CREATE_WORKSPACE_ERROR = "createWorkspaceError",
22-
GET_WORKSPACE_QUOTA_ERROR = "getWorkspaceQuotaError"
22+
GET_WORKSPACE_QUOTA_ERROR = "getWorkspaceQuotaError",
2323
}
2424

2525
export interface CreateWorkspacePageViewProps {
@@ -116,7 +116,10 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
116116
)
117117
}
118118

119-
const canSubmit = props.quota && props.quota.user_workspace_limit > 0 ? props.quota.user_workspace_count < props.quota.user_workspace_limit : true
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
120123

121124
return (
122125
<FullPageForm title="Create workspace" onCancel={props.onCancel}>
@@ -176,13 +179,21 @@ export const CreateWorkspacePageView: FC<React.PropsWithChildren<CreateWorkspace
176179
)}
177180

178181
{props.quota ? (
179-
<WorkspaceQuota quota={props.quota} error={props.createWorkspaceErrors[CreateWorkspaceErrors.GET_WORKSPACE_QUOTA_ERROR]}/>
180-
) : (
181-
<></>
182-
)
183-
}
182+
<WorkspaceQuota
183+
quota={props.quota}
184+
error={
185+
props.createWorkspaceErrors[CreateWorkspaceErrors.GET_WORKSPACE_QUOTA_ERROR]
186+
}
187+
/>
188+
) : (
189+
<></>
190+
)}
184191

185-
<FormFooter onCancel={props.onCancel} isLoading={props.creatingWorkspace} submitDisabled={!canSubmit}/>
192+
<FormFooter
193+
onCancel={props.onCancel}
194+
isLoading={props.creatingWorkspace}
195+
submitDisabled={!canSubmit}
196+
/>
186197
</>
187198
)}
188199
</Stack>

site/src/xServices/createWorkspace/createWorkspaceXService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ export const createWorkspaceMachine = createMachine(
5050
services: {} as {
5151
getTemplates: {
5252
data: Template[]
53-
},
53+
}
5454
getTemplateSchema: {
5555
data: ParameterSchema[]
56-
},
56+
}
5757
getWorkspaceQuota: {
5858
data: WorkspaceQuota
59-
},
59+
}
6060
createWorkspace: {
6161
data: Workspace
62-
},
62+
}
6363
},
6464
},
6565
initial: "gettingTemplates",

0 commit comments

Comments
 (0)