diff --git a/lib/hooks/inline-engagement-text.react.js b/lib/shared/inline-engagement-utils.js rename from lib/hooks/inline-engagement-text.react.js rename to lib/shared/inline-engagement-utils.js --- a/lib/hooks/inline-engagement-text.react.js +++ b/lib/shared/inline-engagement-utils.js @@ -2,7 +2,7 @@ import type { ThreadInfo } from '../types/thread-types.js'; -function useInlineEngagementText(threadInfo: ?ThreadInfo): string { +function getInlineEngagementSidebarText(threadInfo: ?ThreadInfo): string { if (!threadInfo) { return ''; } @@ -10,4 +10,4 @@ return `${repliesCount} ${repliesCount > 1 ? 'replies' : 'reply'}`; } -export default useInlineEngagementText; +export { getInlineEngagementSidebarText }; diff --git a/native/chat/inline-engagement.react.js b/native/chat/inline-engagement.react.js --- a/native/chat/inline-engagement.react.js +++ b/native/chat/inline-engagement.react.js @@ -9,8 +9,8 @@ interpolateNode, } from 'react-native-reanimated'; -import useInlineEngagementText from 'lib/hooks/inline-engagement-text.react.js'; import type { ReactionInfo } from 'lib/selectors/chat-selectors.js'; +import { getInlineEngagementSidebarText } from 'lib/shared/inline-engagement-utils.js'; import { localIDPrefix } from 'lib/shared/message-utils.js'; import { useViewerAlreadySelectedMessageReactions } from 'lib/shared/reaction-utils.js'; import type { MessageInfo } from 'lib/types/message-types.js'; @@ -90,7 +90,7 @@ } }, [disabled, navigateToThread, sidebarInfo]); - const repliesText = useInlineEngagementText(sidebarInfo); + const repliesText = getInlineEngagementSidebarText(sidebarInfo); const sidebarStyle = React.useMemo(() => { const stylesResult = [styles.sidebar]; diff --git a/web/chat/inline-engagement.react.js b/web/chat/inline-engagement.react.js --- a/web/chat/inline-engagement.react.js +++ b/web/chat/inline-engagement.react.js @@ -4,8 +4,8 @@ import * as React from 'react'; import { useModalContext } from 'lib/components/modal-provider.react.js'; -import useInlineEngagementText from 'lib/hooks/inline-engagement-text.react.js'; import type { ReactionInfo } from 'lib/selectors/chat-selectors.js'; +import { getInlineEngagementSidebarText } from 'lib/shared/inline-engagement-utils.js'; import { stringForReactionList } from 'lib/shared/reaction-utils.js'; import type { ThreadInfo } from 'lib/types/thread-types.js'; @@ -23,7 +23,7 @@ function InlineEngagement(props: Props): React.Node { const { threadInfo, reactions, positioning, label } = props; const { pushModal, popModal } = useModalContext(); - const repliesText = useInlineEngagementText(threadInfo); + const repliesText = getInlineEngagementSidebarText(threadInfo); const containerClasses = classNames([ css.inlineEngagementContainer,