Skip to content

Commit 679e160

Browse files
Merge pull request #431 from RedisInsight/fix/RI-2608_fix_WB_pagination
#RI-2608-fix wb pagination
2 parents b499bd4 + 10432e1 commit 679e160

File tree

1 file changed

+6
-5
lines changed
  • redisinsight/ui/src/pages/workbench/components/enablement-area/EnablementArea/components/LazyInternalPage

1 file changed

+6
-5
lines changed

redisinsight/ui/src/pages/workbench/components/enablement-area/EnablementArea/components/LazyInternalPage/LazyInternalPage.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const LazyInternalPage = ({ onClose, title, path, sourcePath }: Props) => {
5757
default:
5858
return []
5959
}
60-
}, [sourcePath])
60+
}, [sourcePath, guides, tutorials])
6161

6262
const loadContent = async () => {
6363
setLoading(true)
@@ -83,12 +83,13 @@ const LazyInternalPage = ({ onClose, title, path, sourcePath }: Props) => {
8383
}
8484

8585
useEffect(() => {
86-
(async function () {
87-
if (!guides.loading) {
86+
const startLoadContent = async () => {
87+
if (!guides.loading && !tutorials.loading) {
8888
await loadContent()
8989
}
90-
}())
91-
}, [path, guides.loading])
90+
}
91+
startLoadContent()
92+
}, [path, sourcePath, guides.loading, tutorials.loading])
9293

9394
const handlePageScroll = (top: number) => {
9495
dispatch(setWorkbenchEAItemScrollTop(top))

0 commit comments

Comments
 (0)