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

Commitcd0a284

Browse files
fix: fix URL parameter for task (#20463)
1 parentf6e86c6 commitcd0a284

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

‎site/src/pages/TaskPage/TaskPage.stories.tsx‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ const meta: Meta<typeof TaskPage> = {
7272
reactRouter:reactRouterParameters({
7373
location:{
7474
pathParams:{
75-
taskId:MockTasks[0].id,
75+
username:MockTask.owner_name,
76+
taskId:MockTask.id,
7677
},
7778
},
78-
routing:{path:"/tasks/:taskId"},
79+
routing:{path:"/tasks/:username/:taskId"},
7980
}),
8081
},
8182
};
@@ -89,6 +90,14 @@ export const LoadingTask: Story = {
8990
()=>newPromise(()=>{}),
9091
);
9192
},
93+
play:async()=>{
94+
awaitwaitFor(()=>{
95+
expect(API.experimental.getTask).toHaveBeenCalledWith(
96+
MockTask.owner_name,
97+
MockTask.id,
98+
);
99+
});
100+
},
92101
};
93102

94103
exportconstLoadingWorkspace:Story={

‎site/src/pages/TaskPage/TaskPage.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ const TaskPageLayout: FC<PropsWithChildren> = ({ children }) => {
5555
};
5656

5757
constTaskPage=()=>{
58-
const{task:taskId, username}=useParams()as{
59-
task:string;
58+
const{ taskId, username}=useParams()as{
59+
taskId:string;
6060
username:string;
6161
};
6262
const{data:task, ...taskQuery}=useQuery({

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp