1
1
import type { Interpolation , Theme } from "@emotion/react" ;
2
- import FormHelperText from "@mui/material/FormHelperText" ;
3
- import TextField from "@mui/material/TextField" ;
4
2
import type * as TypesGen from "api/typesGenerated" ;
5
3
import { Alert } from "components/Alert/Alert" ;
6
4
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
7
5
import { Avatar } from "components/Avatar/Avatar" ;
8
6
import { Button } from "components/Button/Button" ;
9
7
import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
10
8
import { SelectFilter } from "components/Filter/SelectFilter" ;
11
- import { FormFields } from "components/Form/Form" ;
12
9
import { Input } from "components/Input/Input" ;
13
10
import { Label } from "components/Label/Label" ;
14
11
import { Pill } from "components/Pill/Pill" ;
@@ -18,6 +15,7 @@ import { Stack } from "components/Stack/Stack";
18
15
import { UserAutocomplete } from "components/UserAutocomplete/UserAutocomplete" ;
19
16
import { type FormikContextType , useFormik } from "formik" ;
20
17
import { ArrowLeft } from "lucide-react" ;
18
+ import type { WorkspacePermissions } from "modules/permissions/workspaces" ;
21
19
import { generateWorkspaceName } from "modules/workspaces/generateWorkspaceName" ;
22
20
import {
23
21
type FC ,
@@ -44,7 +42,6 @@ import type {
44
42
ExternalAuthPollingState ,
45
43
} from "./CreateWorkspacePage" ;
46
44
import { ExternalAuthButton } from "./ExternalAuthButton" ;
47
- import type { CreateWSPermissions } from "./permissions" ;
48
45
49
46
export const Language = {
50
47
duplicationWarning :
@@ -67,7 +64,7 @@ export interface CreateWorkspacePageViewExperimentalProps {
67
64
parameters : TypesGen . TemplateVersionParameter [ ] ;
68
65
autofillParameters : AutofillBuildParameter [ ] ;
69
66
presets : TypesGen . Preset [ ] ;
70
- permissions : CreateWSPermissions ;
67
+ permissions : WorkspacePermissions ;
71
68
creatingWorkspace : boolean ;
72
69
onCancel : ( ) => void ;
73
70
onSubmit : (
@@ -211,13 +208,14 @@ export const CreateWorkspacePageViewExperimental: FC<
211
208
return (
212
209
< >
213
210
< div className = "absolute sticky top-5 ml-10" >
214
- < Link
215
- to = "/organizations"
216
- className = "flex flex-row items-center gap-2 no-underline text-content-secondary hover:text-content-primary translate-y-12"
211
+ < button
212
+ onClick = { onCancel }
213
+ type = "button"
214
+ className = "flex items-center gap-2 bg-transparent border-none text-content-secondary hover:text-content-primary translate-y-12"
217
215
>
218
216
< ArrowLeft size = { 20 } />
219
- Go Back
220
- </ Link >
217
+ Go back
218
+ </ button >
221
219
</ div >
222
220
< div className = "flex flex-col gap-6 max-w-screen-sm mx-auto" >
223
221
< header className = "flex flex-col gap-2 mt-10" >
@@ -271,11 +269,7 @@ export const CreateWorkspacePageViewExperimental: FC<
271
269
< Label className = "text-sm" htmlFor = { `${ id } -version-id` } >
272
270
Version ID
273
271
</ Label >
274
- < Input
275
- id = { `${ id } -version-id` }
276
- value = { versionId }
277
- disabled
278
- />
272
+ < Input id = { `${ id } -version-id` } value = { versionId } disabled />
279
273
< span className = "text-xs text-content-secondary" >
280
274
This parameter has been preset, and cannot be modified.
281
275
</ span >
0 commit comments