Skip to content
Prev Previous commit
Next Next commit
Fix cancel redirect
  • Loading branch information
BrunoQuaresma committed May 23, 2022
commit 2cea3c7e309218faae0d3f33472061b46bbeb812
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ const CreateWorkspacePage: React.FC = () => {
templates={createWorkspaceState.context.templates}
selectedTemplate={createWorkspaceState.context.selectedTemplate}
templateSchema={createWorkspaceState.context.templateSchema}
onCancel={() => navigate("/workspaces")}
onCancel={() => {
navigate(preSelectedTemplateName ? "/templates" : "/workspaces")
}}
onSubmit={(request) => {
send({
type: "CREATE_WORKSPACE",
Expand Down