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

Commit250ee17

Browse files
authored
fix: Page offset on workspace pagination was incorrect (#6693)
* fix: Page offset on workspace pagination was incorrect
1 parent1ccbd54 commit250ee17

File tree

1 file changed

+3
-1
lines changed
  • site/src/pages/WorkspacesPage

1 file changed

+3
-1
lines changed

‎site/src/pages/WorkspacesPage/data.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export const useWorkspacesData = ({
3232
getWorkspaces({
3333
q:query,
3434
limit:limit,
35-
offset:page,
35+
// If the page is <= 0, just use offset 0. This usually happens
36+
// if the page is not provided.
37+
offset:page<=0 ?0 :(page-1)*limit,
3638
}),
3739
refetchInterval:5_000,
3840
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp