Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some streams disappear when clicking subspace stream #2719

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CW-some-stream-disappear Fixed Render fewer hooks issue
  • Loading branch information
MeyerPV committed Aug 5, 2024
commit 0e0bde068773e2693da6606b4e07e5e8c383bfdc
26 changes: 14 additions & 12 deletions src/pages/common/components/FeedItem/FeedItem.tsx
Original file line number Diff line number Diff line change
@@ -144,18 +144,6 @@ const FeedItem = forwardRef<FeedItemRef, FeedItemProps>((props, ref) => {
onFeedItemUnfollowed,
]);

if (
shouldCheckItemVisibility &&
!checkIsItemVisibleForUser({
itemCircleVisibility: item.circleVisibility,
userCircleIds,
itemUserId: item.userId,
currentUserId,
itemDataType: item.data.type,
})
) {
return null;
}

const generalProps = useMemo(
MeyerPV marked this conversation as resolved.
Show resolved Hide resolved
() => ({
@@ -218,6 +206,20 @@ const FeedItem = forwardRef<FeedItemRef, FeedItemProps>((props, ref) => {
],
);


if (
shouldCheckItemVisibility &&
!checkIsItemVisibleForUser({
itemCircleVisibility: item.circleVisibility,
userCircleIds,
itemUserId: item.userId,
currentUserId,
itemDataType: item.data.type,
})
) {
return null;
}

if (item.data.type === CommonFeedType.Discussion) {
return <DiscussionFeedCard {...generalProps} />;
}
2 changes: 1 addition & 1 deletion src/pages/commonFeed/components/FeedLayout/FeedLayout.tsx
Original file line number Diff line number Diff line change
@@ -221,7 +221,7 @@ const FeedLayout: ForwardRefRenderFunction<FeedLayoutRef, FeedLayoutProps> = (
fetchedCommonMember;
const userForProfile = useUserForProfile();
const governance = chatItem?.nestedItemData
? fetchedGovernance || outerGovernance
? (fetchedGovernance || outerGovernance)
: outerGovernance || fetchedGovernance;

const [splitPaneRef, setSplitPaneRef] = useState<Element | null>(null);
Loading