From 9bc2b6e8360b3b9f045140d2ce996a91bdde994d Mon Sep 17 00:00:00 2001 From: SaurabhSharma-884 Date: Mon, 9 Dec 2024 14:26:52 +0530 Subject: [PATCH] [MA-11]: Update types across files --- .../suggestion/at_mention_provider/at_mention_suggestion.tsx | 2 +- .../src/components/suggestion/channel_mention_provider.tsx | 2 +- .../components/suggestion/command_provider/command_provider.tsx | 2 +- webapp/channels/src/components/suggestion/emoticon_provider.tsx | 2 +- .../src/components/suggestion/generic_channel_provider.tsx | 2 +- .../src/components/suggestion/generic_user_provider.tsx | 2 +- .../channels/src/components/suggestion/menu_action_provider.tsx | 2 +- .../search_channel_suggestion/search_channel_suggestion.tsx | 2 +- .../suggestion/search_channel_with_permissions_provider.tsx | 2 +- .../src/components/suggestion/search_suggestion_list.tsx | 2 +- .../channels/src/components/suggestion/search_user_provider.tsx | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/webapp/channels/src/components/suggestion/at_mention_provider/at_mention_suggestion.tsx b/webapp/channels/src/components/suggestion/at_mention_provider/at_mention_suggestion.tsx index 12d1b1fc267..9a05116fe27 100644 --- a/webapp/channels/src/components/suggestion/at_mention_provider/at_mention_suggestion.tsx +++ b/webapp/channels/src/components/suggestion/at_mention_provider/at_mention_suggestion.tsx @@ -34,7 +34,7 @@ interface Group extends Item { member_count: number; } -const AtMentionSuggestion = React.forwardRef>((props, ref) => { +const AtMentionSuggestion = React.forwardRef>((props, ref) => { const {item} = props; const intl = useIntl(); diff --git a/webapp/channels/src/components/suggestion/channel_mention_provider.tsx b/webapp/channels/src/components/suggestion/channel_mention_provider.tsx index 53358e631b4..fab2a000b60 100644 --- a/webapp/channels/src/components/suggestion/channel_mention_provider.tsx +++ b/webapp/channels/src/components/suggestion/channel_mention_provider.tsx @@ -27,7 +27,7 @@ type WrappedChannel = { loading?: boolean; } -export const ChannelMentionSuggestion = React.forwardRef>((props, ref) => { +export const ChannelMentionSuggestion = React.forwardRef>((props, ref) => { const {item} = props; const channelIsArchived = item.channel && item.channel.delete_at && item.channel.delete_at !== 0; diff --git a/webapp/channels/src/components/suggestion/command_provider/command_provider.tsx b/webapp/channels/src/components/suggestion/command_provider/command_provider.tsx index 017fff0ecb7..d7ea33f99a8 100644 --- a/webapp/channels/src/components/suggestion/command_provider/command_provider.tsx +++ b/webapp/channels/src/components/suggestion/command_provider/command_provider.tsx @@ -30,7 +30,7 @@ const EXECUTE_CURRENT_COMMAND_ITEM_ID = Constants.Integrations.EXECUTE_CURRENT_C const OPEN_COMMAND_IN_MODAL_ITEM_ID = Constants.Integrations.OPEN_COMMAND_IN_MODAL_ITEM_ID; const COMMAND_SUGGESTION_ERROR = Constants.Integrations.COMMAND_SUGGESTION_ERROR; -const CommandSuggestion = React.forwardRef>((props, ref) => { +const CommandSuggestion = React.forwardRef>((props, ref) => { const {item} = props; let symbolSpan = {'/'}; diff --git a/webapp/channels/src/components/suggestion/emoticon_provider.tsx b/webapp/channels/src/components/suggestion/emoticon_provider.tsx index cfe94b2c1db..bdb4a87ee1a 100644 --- a/webapp/channels/src/components/suggestion/emoticon_provider.tsx +++ b/webapp/channels/src/components/suggestion/emoticon_provider.tsx @@ -31,7 +31,7 @@ type EmojiItem = { const suggestionTypeEmoji = 'emoji'; -const EmoticonSuggestion = React.forwardRef>((props, ref) => { +const EmoticonSuggestion = React.forwardRef>((props, ref) => { const text = props.term; const emoji = props.item.emoji; diff --git a/webapp/channels/src/components/suggestion/generic_channel_provider.tsx b/webapp/channels/src/components/suggestion/generic_channel_provider.tsx index 7e0ce1b6725..831f4f7fc75 100644 --- a/webapp/channels/src/components/suggestion/generic_channel_provider.tsx +++ b/webapp/channels/src/components/suggestion/generic_channel_provider.tsx @@ -15,7 +15,7 @@ import type {SuggestionProps} from './suggestion'; type ChannelSearchFunc = (term: string, success: (channels: Channel[]) => void, error?: (err: ServerError) => void) => (ActionResult | Promise); -const GenericChannelSuggestion = React.forwardRef>((props, ref) => { +const GenericChannelSuggestion = React.forwardRef>((props, ref) => { const {item} = props; const channelName = item.display_name; diff --git a/webapp/channels/src/components/suggestion/generic_user_provider.tsx b/webapp/channels/src/components/suggestion/generic_user_provider.tsx index 4bbae1759ab..f311c3e54d2 100644 --- a/webapp/channels/src/components/suggestion/generic_user_provider.tsx +++ b/webapp/channels/src/components/suggestion/generic_user_provider.tsx @@ -18,7 +18,7 @@ import type {ResultsCallback} from './provider'; import {SuggestionContainer} from './suggestion'; import type {SuggestionProps} from './suggestion'; -const GenericUserSuggestion = React.forwardRef>((props, ref) => { +const GenericUserSuggestion = React.forwardRef>((props, ref) => { const {item} = props; const username = item.username; diff --git a/webapp/channels/src/components/suggestion/menu_action_provider.tsx b/webapp/channels/src/components/suggestion/menu_action_provider.tsx index 5d8cc33f47e..b0a5e7d3461 100644 --- a/webapp/channels/src/components/suggestion/menu_action_provider.tsx +++ b/webapp/channels/src/components/suggestion/menu_action_provider.tsx @@ -13,7 +13,7 @@ interface MenuAction { value: string; } -const MenuActionSuggestion = React.forwardRef>((props, ref) => { +const MenuActionSuggestion = React.forwardRef>((props, ref) => { const {item} = props; return ( diff --git a/webapp/channels/src/components/suggestion/search_channel_suggestion/search_channel_suggestion.tsx b/webapp/channels/src/components/suggestion/search_channel_suggestion/search_channel_suggestion.tsx index eb7c6c9dfee..bdcac04414a 100644 --- a/webapp/channels/src/components/suggestion/search_channel_suggestion/search_channel_suggestion.tsx +++ b/webapp/channels/src/components/suggestion/search_channel_suggestion/search_channel_suggestion.tsx @@ -76,7 +76,7 @@ type Props = SuggestionProps & { teammateIsBot: boolean; } -const SearchChannelSuggestion = React.forwardRef((props, ref) => { +const SearchChannelSuggestion = React.forwardRef((props, ref) => { const {item, teammateIsBot, currentUserId} = props; const nameObject = itemToName(item, currentUserId); diff --git a/webapp/channels/src/components/suggestion/search_channel_with_permissions_provider.tsx b/webapp/channels/src/components/suggestion/search_channel_with_permissions_provider.tsx index 9f79f57a598..e1c3768329b 100644 --- a/webapp/channels/src/components/suggestion/search_channel_with_permissions_provider.tsx +++ b/webapp/channels/src/components/suggestion/search_channel_with_permissions_provider.tsx @@ -36,7 +36,7 @@ interface WrappedChannel { type ChannelSearchFunction = (teamId: string, channelPrefix: string) => Promise -const SearchChannelWithPermissionsSuggestion = React.forwardRef>((props, ref) => { +const SearchChannelWithPermissionsSuggestion = React.forwardRef>((props, ref) => { const {item} = props; const channel = item.channel; const channelIsArchived = channel.delete_at && channel.delete_at !== 0; diff --git a/webapp/channels/src/components/suggestion/search_suggestion_list.tsx b/webapp/channels/src/components/suggestion/search_suggestion_list.tsx index 032fc9134c6..c5ffce689a6 100644 --- a/webapp/channels/src/components/suggestion/search_suggestion_list.tsx +++ b/webapp/channels/src/components/suggestion/search_suggestion_list.tsx @@ -58,7 +58,7 @@ export default class SearchSuggestionList extends SuggestionList { } getContent = () => { - return this.itemsContainerRef?.current?.parentNode as HTMLDivElement | null; + return this.itemsContainerRef?.current?.parentNode as HTMLUListElement | null; }; renderChannelDivider(type: string) { diff --git a/webapp/channels/src/components/suggestion/search_user_provider.tsx b/webapp/channels/src/components/suggestion/search_user_provider.tsx index 9d3139a7ea9..ee8ac7bda1c 100644 --- a/webapp/channels/src/components/suggestion/search_user_provider.tsx +++ b/webapp/channels/src/components/suggestion/search_user_provider.tsx @@ -17,7 +17,7 @@ import type {ResultsCallback} from './provider'; import {SuggestionContainer} from './suggestion'; import type {SuggestionProps} from './suggestion'; -export const SearchUserSuggestion = React.forwardRef>((props, ref) => { +export const SearchUserSuggestion = React.forwardRef>((props, ref) => { const {item} = props; const username = item.username;