diff --git a/web-app/src/components/sections/IndexConversation/TabContainer/IndexItemsTab.tsx b/web-app/src/components/sections/IndexConversation/TabContainer/IndexItemsTab.tsx index c5b00f3f..0aefd7bf 100644 --- a/web-app/src/components/sections/IndexConversation/TabContainer/IndexItemsTab.tsx +++ b/web-app/src/components/sections/IndexConversation/TabContainer/IndexItemsTab.tsx @@ -19,18 +19,13 @@ import { useIndexConversation } from "../IndexConversationContext"; const CONCURRENCY_LIMIT = 10; export default function IndexItemsTabSection() { - const { - setItemsState, - loading, - setLoading, - searchLoading, - fetchIndexItems, - fetchMoreIndexItems, - } = useIndexConversation(); + const { setItemsState, searchLoading, fetchIndexItems, fetchMoreIndexItems } = + useIndexConversation(); const { isCreator } = useRole(); const { data: viewedIndex, items, + loading, addItemLoading, } = useAppSelector(selectIndex); const dispatch = useAppDispatch(); @@ -191,46 +186,48 @@ export default function IndexItemsTabSection() { // ); return ( - - {items.data && items.data.length > 0 && ( - - - - - - )} - - {isCreator && ( - - - - - - )} - -
- - viewedIndex && - fetchMoreIndexItems(viewedIndex?.id, { resetCursor: false }) - } - /> -
-
+ !loading && ( + + {items.data && items.data.length > 0 && ( + + + + + + )} + + {isCreator && ( + + + + + + )} + +
+ + viewedIndex && + fetchMoreIndexItems(viewedIndex?.id, { resetCursor: false }) + } + /> +
+
+ ) ); }