diff --git a/src/pages/common/components/CommonTabPanels/components/MembersTab/components/MemberDropdown/AssignCircleModal.tsx b/src/pages/common/components/CommonTabPanels/components/MembersTab/components/MemberDropdown/AssignCircleModal.tsx index 245fd434db..3edc5127c7 100644 --- a/src/pages/common/components/CommonTabPanels/components/MembersTab/components/MemberDropdown/AssignCircleModal.tsx +++ b/src/pages/common/components/CommonTabPanels/components/MembersTab/components/MemberDropdown/AssignCircleModal.tsx @@ -43,6 +43,7 @@ export default function AssignCircleModal({ commonActions.setRecentAssignedCircleByMember({ memberId, circle: selectedCircle, + commonId, }), ); diff --git a/src/store/states/cache/actions.ts b/src/store/states/cache/actions.ts index b030fc384b..3bfe98dc77 100644 --- a/src/store/states/cache/actions.ts +++ b/src/store/states/cache/actions.ts @@ -4,7 +4,6 @@ import { ChatChannelUserStatus, CirclesPermissions, CommonFeedObjectUserUnique, - CommonMemberWithUserInfo, CommonMember, Discussion, DiscussionMessage, diff --git a/src/store/states/cache/saga/copyFeedStateByCommonId.ts b/src/store/states/cache/saga/copyFeedStateByCommonId.ts index ab3405ba70..506777cf93 100644 --- a/src/store/states/cache/saga/copyFeedStateByCommonId.ts +++ b/src/store/states/cache/saga/copyFeedStateByCommonId.ts @@ -7,10 +7,11 @@ export function* copyFeedStateByCommonId({ payload: commonId, }: ReturnType) { const commonState = (yield select(selectCommonState)) as CommonState; + const specificCommonFeedItems = commonState.feedItems[commonId]; const data = - commonState.feedItems.data && commonState.feedItems.data.slice(0, 30); + specificCommonFeedItems.data && specificCommonFeedItems.data.slice(0, 30); const feedItems = { - ...commonState.feedItems, + ...specificCommonFeedItems, data, loading: false, hasMore: true, @@ -27,8 +28,8 @@ export function* copyFeedStateByCommonId({ commonId, state: { feedItems, - pinnedFeedItems: commonState.pinnedFeedItems, - sharedFeedItem: commonState.sharedFeedItem, + pinnedFeedItems: commonState.pinnedFeedItems[commonId], + sharedFeedItem: commonState.sharedFeedItem[commonId], }, }), ); diff --git a/src/store/states/cache/types.ts b/src/store/states/cache/types.ts index c5faa4fcf2..8b0ee33e65 100644 --- a/src/store/states/cache/types.ts +++ b/src/store/states/cache/types.ts @@ -1,4 +1,4 @@ -import { LoadingState } from "@/shared/interfaces"; +import { FeedItemFollowLayoutItem, LoadingState } from "@/shared/interfaces"; import { ChatChannelUserStatus, ChatMessage, @@ -11,12 +11,13 @@ import { Proposal, User, } from "@/shared/models"; -import { CommonState } from "../common"; +import { FeedItems, PinnedFeedItems } from "../common"; -export type FeedState = Pick< - CommonState, - "feedItems" | "pinnedFeedItems" | "sharedFeedItem" ->; +export type FeedState = { + feedItems: FeedItems; + pinnedFeedItems: PinnedFeedItems; + sharedFeedItem: FeedItemFollowLayoutItem | null; +}; export interface CacheState { userStates: Record>;