From efc2f2c2fc2026fb4d0dc400ed082c3ef39a1e29 Mon Sep 17 00:00:00 2001 From: Pavel Meyer Date: Wed, 20 Nov 2024 15:25:42 +0300 Subject: [PATCH] Fix actions --- .../common/components/CommonBreadcrumbs/CommonBreadcrumbs.tsx | 2 +- .../components/CommonTabPanels/components/FeedTab/FeedTab.tsx | 2 +- src/pages/commonFeed/CommonFeed.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/common/components/CommonBreadcrumbs/CommonBreadcrumbs.tsx b/src/pages/common/components/CommonBreadcrumbs/CommonBreadcrumbs.tsx index 36d76ddbac..4b8bcdfafa 100644 --- a/src/pages/common/components/CommonBreadcrumbs/CommonBreadcrumbs.tsx +++ b/src/pages/common/components/CommonBreadcrumbs/CommonBreadcrumbs.tsx @@ -16,7 +16,7 @@ const CommonBreadcrumbs: FC = (props) => { const { activeTab } = props; const { getCommonPagePath } = useRoutesContext(); const { common, parentCommons } = useCommonDataContext(); - const commonAction = useSelector(selectCommonAction(common.id)); + const commonAction = useSelector(selectCommonAction); const items: BreadcrumbItem[] = getBreadcrumbItems({ activeTab, common, diff --git a/src/pages/common/components/CommonTabPanels/components/FeedTab/FeedTab.tsx b/src/pages/common/components/CommonTabPanels/components/FeedTab/FeedTab.tsx index 4496d0a489..12fbea531a 100644 --- a/src/pages/common/components/CommonTabPanels/components/FeedTab/FeedTab.tsx +++ b/src/pages/common/components/CommonTabPanels/components/FeedTab/FeedTab.tsx @@ -61,7 +61,7 @@ export const FeedTab: FC = (props) => { const [chatColumnRef, { width: chatWidth }] = useMeasure(); const user = useSelector(selectUser()); const isTabletView = useIsTabletView(); - const commonAction = useSelector(selectCommonAction(common.id)); + const commonAction = useSelector(selectCommonAction); const allowedFeedActions = !commonAction ? [FeedAction.NewStream] : []; const hasAccessToChat = useMemo( diff --git a/src/pages/commonFeed/CommonFeed.tsx b/src/pages/commonFeed/CommonFeed.tsx index b000e2114a..282a4b60ad 100644 --- a/src/pages/commonFeed/CommonFeed.tsx +++ b/src/pages/commonFeed/CommonFeed.tsx @@ -117,7 +117,7 @@ const CommonFeedComponent: FC = (props) => { (typeof sharedFeedItemIdQueryParam === "string" && sharedFeedItemIdQueryParam) || null; - const commonAction = useSelector(selectCommonAction(commonId)); + const commonAction = useSelector(selectCommonAction); const createdOptimisticFeedItems = useSelector( selectCreatedOptimisticFeedItems, );