fix: updated logic to show sidebar
This commit is contained in:
committed by
Ahtisham Shahid
parent
545b69376f
commit
ad3346ea09
@@ -55,7 +55,7 @@ export const useSidebarVisible = () => {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isViewingTopics || isViewingLearners) {
|
||||
if ((isViewingTopics || isViewingLearners) && totalThreads > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
import { fetchThreads } from './data/thunks';
|
||||
import NoResults from './NoResults';
|
||||
import { PostLink } from './post';
|
||||
import { selectTopicFilter } from '../topics/data/selectors';
|
||||
|
||||
function PostsList({
|
||||
posts, topics, intl, isTopicTab,
|
||||
@@ -88,6 +89,7 @@ function PostsList({
|
||||
<>
|
||||
{postInstances(pinnedPosts)}
|
||||
{postInstances(unpinnedPosts)}
|
||||
{posts?.length === 0 && loadingStatus === RequestStatus.SUCCESSFUL && <NoResults />}
|
||||
{loadingStatus === RequestStatus.IN_PROGRESS ? (
|
||||
<div className="d-flex justify-content-center p-4">
|
||||
<Spinner animation="border" variant="primary" size="lg" />
|
||||
|
||||
Reference in New Issue
Block a user