Skip to content

Commit c158fcb

Browse files
committed
Redirect to project page when created
1 parent 2e875aa commit c158fcb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

site/pages/projects/[organization]/[project].tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ const ProjectPage: React.FC = () => {
2929
const { data: projectInfo, error: projectError } = useSWR<Project, Error>(
3030
() => `/api/v2/projects/${organization}/${project}`,
3131
)
32-
let { data: workspaces, error: workspacesError } = useSWR<Workspace[], Error>(
32+
const { data: workspaces, error: workspacesError } = useSWR<Workspace[], Error>(
3333
() => `/api/v2/projects/${organization}/${project}/workspaces`,
3434
)
3535

36-
workspaces = [MockWorkspace]
37-
3836
if (projectError) {
3937
return <ErrorSummary error={projectError} />
4038
}

site/pages/projects/create.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const CreateProjectPage: React.FC = () => {
2929

3030
const onSubmit = async (req: API.CreateProjectRequest) => {
3131
const project = await API.Project.create(req)
32-
await router.push("/projects")
32+
await router.push(`/projects/${req.organizationId}/${project.name}`)
3333
return project
3434
}
3535

0 commit comments

Comments
 (0)