Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9431c45

Browse files
authored
fix: Redirect to workspaces page after creation (#309)
This is just a quick fix so that the redirection is correct after creating a workspace - so that we make it to our minimal 'workspaces' page. Mainly so we have a path for testing / onboarding more people.Unfortunately the NextJS pages are a bit tricky to test - we don't have infra for it because of the special pathing requirements - we can potentially bring in a library like [next-page-tester](https://github.com/next-page-tester/next-page-tester) and create a separate test directory like `pages_test` - but since we may pick up the RFC to move away from Next, it doesn't seem like a useful effort.With this, creating a project lands on our minimal workspaces page, and the links on the Projects page correctly navigate to the minimal workspaces page.
1 parentdd36317 commit9431c45

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

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

3333
constonSubmit=async(req:API.CreateWorkspaceRequest)=>{
3434
constworkspace=awaitAPI.Workspace.create(req)
35-
awaitrouter.push(`/workspaces/${workspace.id}`)
35+
awaitrouter.push(`/workspaces/me/${workspace.name}`)
3636
returnworkspace
3737
}
3838

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ const ProjectPage: React.FC = () => {
6161
{
6262
key:"name",
6363
name:"Name",
64-
renderer:(nameField:string,data:Workspace)=>{
65-
return<Linkhref={`/projects/${organization}/${project}/${data.id}`}>{nameField}</Link>
64+
renderer:(nameField:string)=>{
65+
return<Linkhref={`/workspaces/me/${nameField}`}>{nameField}</Link>
6666
},
6767
},
6868
]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp