File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
app/feature/search/components Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Fa6SolidAngleLeft from "~icons/fa6-solid/angle-left";
9
9
import Fa6SolidAngleRight from "~icons/fa6-solid/angle-right" ;
10
10
11
11
import type { PaginationMeta } from "../../../generated/api/schemas/paginationMeta" ;
12
+ import { useNetworkBusy } from "../../../hooks/useNetworkBusy" ;
12
13
import { buildPaginationMeta } from "../pagination" ;
13
14
import type { noteSearchParamSchema } from "../validation" ;
14
15
@@ -29,6 +30,8 @@ export const SearchPagination = ({
29
30
visibleItemCount,
30
31
...groupProps
31
32
} : PaginationProps ) => {
33
+ const isNetworkBusy = useNetworkBusy ( ) ;
34
+
32
35
const pagination = buildPaginationMeta ( meta , currentQuery ) ;
33
36
34
37
const pageFirstItemIndex = currentQuery . offset + 1 ;
@@ -66,6 +69,7 @@ export const SearchPagination = ({
66
69
aria-label = "前のページへ移動する"
67
70
color = "pink"
68
71
component = { Link }
72
+ disabled = { isNetworkBusy }
69
73
loading = { prevLoading }
70
74
onClick = { handlePrevClick }
71
75
to = { prevTo }
@@ -83,6 +87,7 @@ export const SearchPagination = ({
83
87
aria-label = "次のページへ移動する"
84
88
color = "pink"
85
89
component = { Link }
90
+ disabled = { isNetworkBusy }
86
91
loading = { nextLoading }
87
92
onClick = { handleNextClick }
88
93
to = { nextTo }
You can’t perform that action at this time.
0 commit comments