Skip to content

Commit 8487737

Browse files
committed
remove unused search context from ChatMessageContent
1 parent fa05898 commit 8487737

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/pages/inbox/report/actionContents/ChatMessageContent.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import React, {use} from 'react';
1+
import React from 'react';
22
import type {TextInput} from 'react-native';
33
import {View} from 'react-native';
44
import type {OnyxEntry} from 'react-native-onyx';
55
import {AttachmentContext} from '@components/AttachmentContext';
66
import Button from '@components/Button';
77
import MentionReportContext from '@components/HTMLEngineProvider/HTMLRenderers/MentionReportRenderer/MentionReportContext';
88
import {useBlockedFromConcierge} from '@components/OnyxListItemProvider';
9-
import {SearchStateContext} from '@components/Search/SearchContext';
109
import {ShowContextMenuActionsContext, ShowContextMenuStateContext} from '@components/ShowContextMenuContext';
1110
import Text from '@components/Text';
1211
import useLocalize from '@hooks/useLocalize';
@@ -85,12 +84,7 @@ function ChatMessageContent({
8584

8685
const mentionReportContextValue = {currentReportID: report?.reportID, exactlyMatch: true};
8786

88-
let currentSearchHash: number | undefined;
89-
if (isOnSearch) {
90-
const {currentSearchHash: searchContextCurrentSearchHash} = use(SearchStateContext);
91-
currentSearchHash = searchContextCurrentSearchHash;
92-
}
93-
const attachmentContextValue = isOnSearch ? {type: CONST.ATTACHMENT_TYPE.SEARCH, currentSearchHash} : {reportID, type: CONST.ATTACHMENT_TYPE.REPORT};
87+
const attachmentContextValue = isOnSearch ? {type: CONST.ATTACHMENT_TYPE.SEARCH} : {reportID, type: CONST.ATTACHMENT_TYPE.REPORT};
9488

9589
const {hasBeenFlagged} = getModerationFlagState(action);
9690

0 commit comments

Comments
 (0)