refactor: Refactor create workspace page (#4862)

This commit is contained in:
Bruno Quaresma
2022-11-02 17:44:41 -03:00
committed by GitHub
parent 86fc3e09a3
commit f76e7b1dbd
12 changed files with 384 additions and 137 deletions

View File

@ -25,7 +25,6 @@ const CreateWorkspacePage: FC = () => {
shallowEqual,
)
const workspaceQuotaEnabled = featureVisibility[FeatureNames.WorkspaceQuota]
const [authState] = useActor(xServices.authXService)
const { me } = authState.context
const [createWorkspaceState, send] = useMachine(createWorkspaceMachine, {
@ -89,7 +88,8 @@ const CreateWorkspacePage: FC = () => {
})
}}
onCancel={() => {
navigate("/templates")
// Go back
navigate(-1)
}}
onSubmit={(request) => {
send({