diff --git a/.vscode/client.code-snippets b/.vscode/client.code-snippets index 28fb9709b8ce..8629bffa6a2a 100644 --- a/.vscode/client.code-snippets +++ b/.vscode/client.code-snippets @@ -4,7 +4,6 @@ "prefix": "sbmodule", "body": [ "import type { Meta, StoryFn } from '@storybook/react';", - "import React from 'react';", "", "import $1 from './$1';", "", diff --git a/apps/meteor/.babelrc b/apps/meteor/.babelrc index c991fa3bbf99..d57e624148cc 100644 --- a/apps/meteor/.babelrc +++ b/apps/meteor/.babelrc @@ -9,6 +9,14 @@ } ] ], + "plugins": [ + [ + "@babel/plugin-transform-react-jsx", + { + "runtime": "automatic" + } + ] + ], "env": { "coverage": { "plugins": [ diff --git a/apps/meteor/.storybook/decorators.tsx b/apps/meteor/.storybook/decorators.tsx index dfe8eda6b2e3..cb179dc3d0a2 100644 --- a/apps/meteor/.storybook/decorators.tsx +++ b/apps/meteor/.storybook/decorators.tsx @@ -1,6 +1,5 @@ import { mockAppRoot } from '@rocket.chat/mock-providers'; import type { Decorator } from '@storybook/react'; -import React from 'react'; import ModalContextMock from '../client/stories/contexts/ModalContextMock'; import RouterContextMock from '../client/stories/contexts/RouterContextMock'; diff --git a/apps/meteor/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx b/apps/meteor/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx index 58ede259fb45..d086da9035d2 100644 --- a/apps/meteor/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx +++ b/apps/meteor/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal.tsx @@ -1,5 +1,4 @@ import { Button, Modal } from '@rocket.chat/fuselage'; -import React from 'react'; import { useTranslation } from 'react-i18next'; type PlaceChatOnHoldModalProps = { diff --git a/apps/meteor/app/ui-message/client/messageBox/AddLinkComposerActionModal.tsx b/apps/meteor/app/ui-message/client/messageBox/AddLinkComposerActionModal.tsx index 21e502c90001..69611b5253fc 100644 --- a/apps/meteor/app/ui-message/client/messageBox/AddLinkComposerActionModal.tsx +++ b/apps/meteor/app/ui-message/client/messageBox/AddLinkComposerActionModal.tsx @@ -1,6 +1,6 @@ import { Field, FieldGroup, TextInput, FieldLabel, FieldRow, Box } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { useForm, Controller } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; diff --git a/apps/meteor/client/NavBarV2/NavBar.tsx b/apps/meteor/client/NavBarV2/NavBar.tsx index 116ff00b4075..26a281452c54 100644 --- a/apps/meteor/client/NavBarV2/NavBar.tsx +++ b/apps/meteor/client/NavBarV2/NavBar.tsx @@ -2,7 +2,7 @@ import { useToolbar } from '@react-aria/toolbar'; import { NavBar as NavBarComponent, NavBarSection, NavBarGroup, NavBarDivider } from '@rocket.chat/fuselage'; import { usePermission, useTranslation, useUser } from '@rocket.chat/ui-contexts'; import { useVoipState } from '@rocket.chat/ui-voip'; -import React, { useRef } from 'react'; +import { useRef } from 'react'; import { NavBarItemOmniChannelCallDialPad, diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmniChannelCallDialPad.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmniChannelCallDialPad.tsx index 2693060578ed..a1abf735a119 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmniChannelCallDialPad.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmniChannelCallDialPad.tsx @@ -1,6 +1,5 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import { useVoipOutboundStates } from '../../contexts/CallContext'; diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggle.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggle.tsx index 0df36e6e73c3..83c0da87964d 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggle.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggle.tsx @@ -1,5 +1,4 @@ import type { ComponentPropsWithoutRef } from 'react'; -import React from 'react'; import NavBarItemOmnichannelCallToggleError from './NavBarItemOmnichannelCallToggleError'; import NavBarItemOmnichannelCallToggleLoading from './NavBarItemOmnichannelCallToggleLoading'; diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleError.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleError.tsx index 7f2b6adc8691..a713310d6d83 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleError.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleError.tsx @@ -1,6 +1,5 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; type NavBarItemOmnichannelCallToggleErrorProps = ComponentPropsWithoutRef; diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleLoading.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleLoading.tsx index 149500050402..b39a2541513e 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleLoading.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleLoading.tsx @@ -1,6 +1,5 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; type NavBarItemOmnichannelCallToggleLoadingProps = ComponentPropsWithoutRef; diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleReady.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleReady.tsx index 82f1c28350cd..104c6a2cc7b3 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleReady.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelCallToggleReady.tsx @@ -1,6 +1,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useCallerInfo, useCallRegisterClient, useCallUnregisterClient, useVoipNetworkStatus } from '../../contexts/CallContext'; diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelContact.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelContact.tsx index 99cdbd9b4a16..08eaeaabacb4 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelContact.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelContact.tsx @@ -1,7 +1,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import { useRouter, useCurrentRoutePath } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; type NavBarItemOmnichannelContactProps = Omit, 'is'>; diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelLivechatToggle.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelLivechatToggle.tsx index abf8ca432c28..f67c21647a06 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelLivechatToggle.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelLivechatToggle.tsx @@ -2,7 +2,6 @@ import { Sidebar } from '@rocket.chat/fuselage'; import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; import { useEndpoint, useToastMessageDispatch } from '@rocket.chat/ui-contexts'; import type { ReactElement, ComponentProps } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import { useOmnichannelAgentAvailable } from '../../hooks/omnichannel/useOmnichannelAgentAvailable'; diff --git a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelQueue.tsx b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelQueue.tsx index 8b1c00a2a17c..471a1293ddbc 100644 --- a/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelQueue.tsx +++ b/apps/meteor/client/NavBarV2/NavBarOmnichannelToolbar/NavBarItemOmnichannelQueue.tsx @@ -1,7 +1,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import { useRouter, useCurrentRoutePath } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; type NavBarItemOmnichannelQueueProps = Omit, 'is'>; diff --git a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemAuditMenu.tsx b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemAuditMenu.tsx index 7f47611f9bdb..2da6f7529be0 100644 --- a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemAuditMenu.tsx +++ b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemAuditMenu.tsx @@ -2,7 +2,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import { GenericMenu } from '@rocket.chat/ui-client'; import { useCurrentRoutePath } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import { useAuditMenu } from './hooks/useAuditMenu'; diff --git a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemDirectoryPage.tsx b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemDirectoryPage.tsx index 0cc26c6c1356..fa03a595a945 100644 --- a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemDirectoryPage.tsx +++ b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemDirectoryPage.tsx @@ -2,7 +2,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; import { useRouter, useCurrentRoutePath } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; type NavBarItemDirectoryPageProps = Omit, 'is'>; diff --git a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemHomePage.tsx b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemHomePage.tsx index 128a41ea97ae..c6972ff42e70 100644 --- a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemHomePage.tsx +++ b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemHomePage.tsx @@ -2,7 +2,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; import { useRouter, useLayout, useSetting, useCurrentRoutePath } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; type NavBarItemHomePageProps = Omit, 'is'>; diff --git a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemMarketPlaceMenu.tsx b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemMarketPlaceMenu.tsx index 1e7fbdefb083..0ebcf0478775 100644 --- a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemMarketPlaceMenu.tsx +++ b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/NavBarItemMarketPlaceMenu.tsx @@ -2,7 +2,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import { GenericMenu } from '@rocket.chat/ui-client'; import { useCurrentRoutePath } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import { useMarketPlaceMenu } from './hooks/useMarketPlaceMenu'; diff --git a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/hooks/useMarketPlaceMenu.tsx b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/hooks/useMarketPlaceMenu.tsx index 80e61896bed3..f1de5bc46b72 100644 --- a/apps/meteor/client/NavBarV2/NavBarPagesToolbar/hooks/useMarketPlaceMenu.tsx +++ b/apps/meteor/client/NavBarV2/NavBarPagesToolbar/hooks/useMarketPlaceMenu.tsx @@ -1,7 +1,6 @@ import { Badge, Skeleton } from '@rocket.chat/fuselage'; import type { GenericMenuItemProps } from '@rocket.chat/ui-client'; import { useTranslation, usePermission, useRouter } from '@rocket.chat/ui-contexts'; -import React from 'react'; import { useUserDropdownAppsActionButtons } from '../../../hooks/useUserDropdownAppsActionButtons'; import { useAppRequestStats } from '../../../views/marketplace/hooks/useAppRequestStats'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemAdministrationMenu.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemAdministrationMenu.tsx index a17061050ce9..d4ff95ae9f63 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemAdministrationMenu.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemAdministrationMenu.tsx @@ -2,7 +2,6 @@ import { NavBarItem } from '@rocket.chat/fuselage'; import { GenericMenu } from '@rocket.chat/ui-client'; import { useCurrentRoutePath } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import { useAdministrationMenu } from './hooks/useAdministrationMenu'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemLoginPage.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemLoginPage.tsx index 1ef6f298fccd..cc0f2bb4ab3a 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemLoginPage.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/NavBarItemLoginPage.tsx @@ -1,7 +1,6 @@ import { Button } from '@rocket.chat/fuselage'; import { useSessionDispatch } from '@rocket.chat/ui-contexts'; import type { HTMLAttributes } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; type NavBarItemLoginPageProps = Omit, 'is'>; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/EditStatusModal.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/EditStatusModal.tsx index f4dce69af876..e787fb51999d 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/EditStatusModal.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/EditStatusModal.tsx @@ -3,7 +3,7 @@ import { Field, TextInput, FieldGroup, Modal, Button, Box, FieldLabel, FieldRow, import { useEffectEvent, useLocalStorage } from '@rocket.chat/fuselage-hooks'; import { useToastMessageDispatch, useSetting, useTranslation, useEndpoint } from '@rocket.chat/ui-contexts'; import type { ReactElement, ChangeEvent, ComponentProps, FormEvent } from 'react'; -import React, { useState, useCallback } from 'react'; +import { useState, useCallback } from 'react'; import UserStatusMenu from '../../../components/UserStatusMenu'; import { USER_STATUS_TEXT_MAX_LENGTH } from '../../../lib/constants'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenu.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenu.tsx index 149ad0ea585e..171b8762c314 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenu.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenu.tsx @@ -2,7 +2,7 @@ import type { IUser } from '@rocket.chat/core-typings'; import { GenericMenu, useHandleMenuAction } from '@rocket.chat/ui-client'; import type { GenericMenuItemProps } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { memo, useState } from 'react'; +import { memo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import UserMenuButton from './UserMenuButton'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuButton.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuButton.tsx index 4ff16cf37be8..2ae0808eb450 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuButton.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuButton.tsx @@ -3,7 +3,7 @@ import { Box, IconButton } from '@rocket.chat/fuselage'; import { UserAvatar } from '@rocket.chat/ui-avatar'; import { useSetting, useUser } from '@rocket.chat/ui-contexts'; import type { ComponentPropsWithoutRef, ForwardedRef } from 'react'; -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { UserStatus } from '../../../components/UserStatus'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuHeader.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuHeader.tsx index 6c6a2e9acf85..158b666b64c1 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuHeader.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/UserMenuHeader.tsx @@ -2,7 +2,6 @@ import type { IUser } from '@rocket.chat/core-typings'; import { Box, Margins } from '@rocket.chat/fuselage'; import { UserAvatar } from '@rocket.chat/ui-avatar'; import { useSetting } from '@rocket.chat/ui-contexts'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import MarkdownText from '../../../components/MarkdownText'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useAccountItems.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useAccountItems.tsx index b29228c4d73f..99100fdad2b5 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useAccountItems.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useAccountItems.tsx @@ -3,7 +3,6 @@ import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; import type { GenericMenuItemProps } from '@rocket.chat/ui-client'; import { defaultFeaturesPreview, usePreferenceFeaturePreviewList } from '@rocket.chat/ui-client'; import { useRouter } from '@rocket.chat/ui-contexts'; -import React from 'react'; import { useTranslation } from 'react-i18next'; export const useAccountItems = (): GenericMenuItemProps[] => { diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useCustomStatusModalHandler.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useCustomStatusModalHandler.tsx index f0f863f8efab..9ea77e131c59 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useCustomStatusModalHandler.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useCustomStatusModalHandler.tsx @@ -1,5 +1,4 @@ import { useSetModal, useUser } from '@rocket.chat/ui-contexts'; -import React from 'react'; import EditStatusModal from '../EditStatusModal'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useStatusItems.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useStatusItems.tsx index 910aa228902a..479d523d81bf 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useStatusItems.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useStatusItems.tsx @@ -2,7 +2,7 @@ import { Box } from '@rocket.chat/fuselage'; import type { GenericMenuItemProps } from '@rocket.chat/ui-client'; import { useEndpoint, useSetting } from '@rocket.chat/ui-contexts'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { useCustomStatusModalHandler } from './useCustomStatusModalHandler'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useUserMenu.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useUserMenu.tsx index 273b3cd8687e..437a35c73833 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useUserMenu.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useUserMenu.tsx @@ -2,7 +2,6 @@ import type { IUser } from '@rocket.chat/core-typings'; import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; import type { GenericMenuItemProps } from '@rocket.chat/ui-client'; import { useLogout } from '@rocket.chat/ui-contexts'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import UserMenuHeader from '../UserMenuHeader'; diff --git a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useVoipItemsSection.tsx b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useVoipItemsSection.tsx index b72af8ff2b10..1ee34d14c8d5 100644 --- a/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useVoipItemsSection.tsx +++ b/apps/meteor/client/NavBarV2/NavBarSettingsToolbar/UserMenu/hooks/useVoipItemsSection.tsx @@ -3,7 +3,7 @@ import type { GenericMenuItemProps } from '@rocket.chat/ui-client'; import { useToastMessageDispatch } from '@rocket.chat/ui-contexts'; import { useVoipAPI, useVoipState } from '@rocket.chat/ui-voip'; import { useMutation } from '@tanstack/react-query'; -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; export const useVoipItemsSection = (): { items: GenericMenuItemProps[] } | undefined => { diff --git a/apps/meteor/client/NavBarV2/NavBarVoipToolbar/NavBarItemVoipDialer.tsx b/apps/meteor/client/NavBarV2/NavBarVoipToolbar/NavBarItemVoipDialer.tsx index bdc62c41b1da..ce3f0b829458 100644 --- a/apps/meteor/client/NavBarV2/NavBarVoipToolbar/NavBarItemVoipDialer.tsx +++ b/apps/meteor/client/NavBarV2/NavBarVoipToolbar/NavBarItemVoipDialer.tsx @@ -3,7 +3,7 @@ import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; import { useLayout } from '@rocket.chat/ui-contexts'; import { useVoipDialer, useVoipState } from '@rocket.chat/ui-voip'; import type { HTMLAttributes } from 'react'; -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; type NavBarItemVoipDialerProps = Omit, 'is'> & { diff --git a/apps/meteor/client/apps/gameCenter/GameCenter.tsx b/apps/meteor/client/apps/gameCenter/GameCenter.tsx index 6eb5c6fdeb3e..768a9d9ec81e 100644 --- a/apps/meteor/client/apps/gameCenter/GameCenter.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenter.tsx @@ -1,6 +1,6 @@ import type { IExternalComponent } from '@rocket.chat/apps-engine/definition/externalComponent'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; -import React, { useState } from 'react'; +import { useState } from 'react'; import type { ReactElement } from 'react'; import GameCenterContainer from './GameCenterContainer'; diff --git a/apps/meteor/client/apps/gameCenter/GameCenterContainer.tsx b/apps/meteor/client/apps/gameCenter/GameCenterContainer.tsx index 69a73161ab1c..daa4cf1d6815 100644 --- a/apps/meteor/client/apps/gameCenter/GameCenterContainer.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenterContainer.tsx @@ -1,6 +1,5 @@ import { Avatar } from '@rocket.chat/fuselage'; import type { ReactElement } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import type { IGame } from './GameCenter'; diff --git a/apps/meteor/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx b/apps/meteor/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx index 5c20758cde3b..c5f834b1760f 100644 --- a/apps/meteor/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenterInvitePlayersModal.tsx @@ -1,7 +1,7 @@ import type { IUser } from '@rocket.chat/core-typings'; import { Box } from '@rocket.chat/fuselage'; import type { ReactElement } from 'react'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import type { IGame } from './GameCenter'; diff --git a/apps/meteor/client/apps/gameCenter/GameCenterList.tsx b/apps/meteor/client/apps/gameCenter/GameCenterList.tsx index 03f57f0f1b6a..32537f75a3cd 100644 --- a/apps/meteor/client/apps/gameCenter/GameCenterList.tsx +++ b/apps/meteor/client/apps/gameCenter/GameCenterList.tsx @@ -1,7 +1,7 @@ import { Avatar, Icon, Table, TableBody, TableCell, TableHead, TableRow } from '@rocket.chat/fuselage'; import { useSetModal } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import type { IGame } from './GameCenter'; @@ -20,7 +20,7 @@ const GameCenterList = ({ handleClose, handleOpenGame, games, isLoading }: IGame const { t } = useTranslation(); const setModal = useSetModal(); const handleInvitePlayer = useCallback( - (game) => { + (game: IGame) => { const handleClose = (): void => { setModal(null); }; diff --git a/apps/meteor/client/components/ActionManagerBusyState.tsx b/apps/meteor/client/components/ActionManagerBusyState.tsx index 932eb08ea502..2388401411ab 100644 --- a/apps/meteor/client/components/ActionManagerBusyState.tsx +++ b/apps/meteor/client/components/ActionManagerBusyState.tsx @@ -1,6 +1,6 @@ import { css } from '@rocket.chat/css-in-js'; import { Box } from '@rocket.chat/fuselage'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useUiKitActionManager } from '../uikit/hooks/useUiKitActionManager'; diff --git a/apps/meteor/client/components/AutoCompleteAgent.tsx b/apps/meteor/client/components/AutoCompleteAgent.tsx index 059ac4251cc8..fad5b1a15d57 100644 --- a/apps/meteor/client/components/AutoCompleteAgent.tsx +++ b/apps/meteor/client/components/AutoCompleteAgent.tsx @@ -1,7 +1,7 @@ import { PaginatedSelectFiltered } from '@rocket.chat/fuselage'; import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; import type { ReactElement } from 'react'; -import React, { memo, useMemo, useState } from 'react'; +import { memo, useMemo, useState } from 'react'; import { useRecordList } from '../hooks/lists/useRecordList'; import { AsyncStatePhase } from '../lib/asyncState'; diff --git a/apps/meteor/client/components/AutoCompleteAgentWithoutExtension.tsx b/apps/meteor/client/components/AutoCompleteAgentWithoutExtension.tsx index c75c827067ec..5cb69abf9598 100644 --- a/apps/meteor/client/components/AutoCompleteAgentWithoutExtension.tsx +++ b/apps/meteor/client/components/AutoCompleteAgentWithoutExtension.tsx @@ -1,7 +1,7 @@ import type { ILivechatAgent } from '@rocket.chat/core-typings'; import { PaginatedSelectFiltered } from '@rocket.chat/fuselage'; import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; -import React, { memo, useMemo, useState } from 'react'; +import { memo, useMemo, useState } from 'react'; import { useRecordList } from '../hooks/lists/useRecordList'; import { AsyncStatePhase } from '../lib/asyncState'; diff --git a/apps/meteor/client/components/AutoCompleteDepartment.tsx b/apps/meteor/client/components/AutoCompleteDepartment.tsx index 67f96f4a414c..1e9b399f8986 100644 --- a/apps/meteor/client/components/AutoCompleteDepartment.tsx +++ b/apps/meteor/client/components/AutoCompleteDepartment.tsx @@ -1,7 +1,7 @@ import { PaginatedSelectFiltered } from '@rocket.chat/fuselage'; import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; import type { ComponentProps, ReactElement } from 'react'; -import React, { memo, useMemo, useState } from 'react'; +import { memo, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useRecordList } from '../hooks/lists/useRecordList'; diff --git a/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx b/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx index 80aa3f2a4745..ce5cf7765c93 100644 --- a/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx +++ b/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx @@ -2,7 +2,7 @@ import { CheckOption, PaginatedMultiSelectFiltered } from '@rocket.chat/fuselage import type { PaginatedMultiSelectOption } from '@rocket.chat/fuselage'; import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; import type { ComponentProps } from 'react'; -import React, { memo, useMemo, useState } from 'react'; +import { memo, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useRecordList } from '../hooks/lists/useRecordList'; diff --git a/apps/meteor/client/components/Backdrop.tsx b/apps/meteor/client/components/Backdrop.tsx index 666ba432f13e..69c39d1a022a 100644 --- a/apps/meteor/client/components/Backdrop.tsx +++ b/apps/meteor/client/components/Backdrop.tsx @@ -1,6 +1,5 @@ import { Modal } from '@rocket.chat/fuselage'; import type { ComponentProps, ReactElement } from 'react'; -import React from 'react'; type BackdropProps = ComponentProps; diff --git a/apps/meteor/client/components/ConfirmOwnerChangeModal.tsx b/apps/meteor/client/components/ConfirmOwnerChangeModal.tsx index 77135fad6230..8a69dd8b31e4 100644 --- a/apps/meteor/client/components/ConfirmOwnerChangeModal.tsx +++ b/apps/meteor/client/components/ConfirmOwnerChangeModal.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { ComponentPropsWithoutRef } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import GenericModal from './GenericModal'; diff --git a/apps/meteor/client/components/Contextualbar/Contextualbar.tsx b/apps/meteor/client/components/Contextualbar/Contextualbar.tsx index 481537d23f3e..7325fe129b34 100644 --- a/apps/meteor/client/components/Contextualbar/Contextualbar.tsx +++ b/apps/meteor/client/components/Contextualbar/Contextualbar.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2, Contextualbar as ContextualbarComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { forwardRef, memo } from 'react'; +import { forwardRef, memo } from 'react'; const Contextualbar = forwardRef>(function Contextualbar(props, ref) { return ( diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarAction.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarAction.tsx index 567bd4e276e1..a8d0fbd04e61 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarAction.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarAction.tsx @@ -1,7 +1,7 @@ import { ContextualbarAction as ContextualbarActionComponent, ContextualbarV2Action } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; const ContextualbarAction = (props: ComponentProps) => ( diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarActions.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarActions.tsx index 869030ddb479..a90626827cde 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarActions.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarActions.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Actions, ContextualbarActions as ContextualbarActionsComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; const ContextualbarActions = (props: ComponentProps) => ( diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarBack.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarBack.tsx index dcac448b1e92..7c03e574b0e8 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarBack.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarBack.tsx @@ -1,5 +1,5 @@ import type { ReactElement, ComponentProps } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import ContextualbarAction from './ContextualbarAction'; diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarButton.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarButton.tsx index ab2ab878503e..62562f265cb4 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarButton.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarButton.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Button, ContextualbarButton as ContextualbarButtonComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; const ContextualbarButton = (props: ComponentProps) => ( diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarClose.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarClose.tsx index 38db516476e3..4104a1c28cd7 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarClose.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarClose.tsx @@ -1,5 +1,5 @@ import type { ComponentProps, ReactElement } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import ContextualbarAction from './ContextualbarAction'; diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarContent.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarContent.tsx index 8986969d8a1d..ebaecc789725 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarContent.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarContent.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Content, ContextualbarContent as ContextualbarContentComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { forwardRef, memo } from 'react'; +import { forwardRef, memo } from 'react'; const ContextualbarContent = forwardRef>( function ContextualbarContent(props, ref) { diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarDialog.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarDialog.tsx index 528b01e8854a..675fffbd8aeb 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarDialog.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarDialog.tsx @@ -1,7 +1,7 @@ import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import { useLayoutSizes, useLayoutContextualBarPosition } from '@rocket.chat/ui-contexts'; -import type { ComponentProps, KeyboardEvent } from 'react'; -import React, { useCallback, useRef } from 'react'; +import type { ComponentProps } from 'react'; +import { useCallback, useRef } from 'react'; import type { AriaDialogProps } from 'react-aria'; import { FocusScope, useDialog } from 'react-aria'; @@ -16,14 +16,14 @@ type ContextualbarDialogProps = AriaDialogProps & ComponentProps { - const ref = useRef(null); + const ref = useRef(null); const { dialogProps } = useDialog({ 'aria-labelledby': 'contextualbarTitle', ...props }, ref); const { contextualBar } = useLayoutSizes(); const position = useLayoutContextualBarPosition(); const { closeTab } = useRoomToolbox(); const callbackRef = useCallback( - (node) => { + (node: HTMLElement | null) => { if (!node) { return; } diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarEmptyContent.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarEmptyContent.tsx index be3b3aca7c53..63be25a395e9 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarEmptyContent.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarEmptyContent.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2EmptyContent, ContextualbarEmptyContent as ContextualbarEmptyContentComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { forwardRef, memo } from 'react'; +import { forwardRef, memo } from 'react'; const ContextualbarEmptyContent = forwardRef>( function ContextualbarEmptyContent(props, ref) { diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarFooter.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarFooter.tsx index c0e0d5304567..b8f6c6026581 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarFooter.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarFooter.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Footer, ContextualbarFooter as ContextualbarFooterComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { forwardRef, memo } from 'react'; +import { forwardRef, memo } from 'react'; const ContextualbarFooter = forwardRef>( function ContextualbarFooter(props, ref) { diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx index ebd92f0095e3..5d289b18dbda 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Header, ContextualbarHeader as ContextualbarHeaderComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentPropsWithoutRef, ReactNode } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; type ContextualbarHeaderProps = { expanded?: boolean; diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarIcon.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarIcon.tsx index 5f6062fe351a..488e4e536b89 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarIcon.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarIcon.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Icon, ContextualbarIcon as ContextualbarIconComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; const ContextualbarIcon = (props: ComponentProps) => ( diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarInnerContent.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarInnerContent.tsx index 69c59f3b5db4..8612f8197f74 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarInnerContent.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarInnerContent.tsx @@ -1,6 +1,6 @@ import { Box } from '@rocket.chat/fuselage'; import type { ReactElement, ComponentProps } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; const ContextualbarInnerContent = (props: ComponentProps): ReactElement => ( diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarResizable.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarResizable.tsx index 69adfd4bc7e1..36e2863df2f7 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarResizable.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarResizable.tsx @@ -3,7 +3,6 @@ import { Palette, Box } from '@rocket.chat/fuselage'; import { useLocalStorage } from '@rocket.chat/fuselage-hooks'; import { Resizable } from 're-resizable'; import type { ComponentProps } from 'react'; -import React from 'react'; type ContextualbarResizableProps = { defaultWidth: string } & ComponentProps; diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarScrollableContent.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarScrollableContent.tsx index 76069d748e92..68fac12bd758 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarScrollableContent.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarScrollableContent.tsx @@ -1,6 +1,6 @@ import { Margins } from '@rocket.chat/fuselage'; import type { ComponentProps } from 'react'; -import React, { forwardRef, memo } from 'react'; +import { forwardRef, memo } from 'react'; import { PageScrollableContent } from '../Page'; diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarSection.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarSection.tsx index d6ab9ac12e27..0226d214f825 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarSection.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarSection.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Section, ContextualbarSection as ContextualbarSectionComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { forwardRef, memo } from 'react'; +import { forwardRef, memo } from 'react'; const ContextualbarSection = forwardRef>( function ContextualbarSection(props, ref) { diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarSkeleton.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarSkeleton.tsx index 92b74451b450..550c6b57cc06 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarSkeleton.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarSkeleton.tsx @@ -1,7 +1,7 @@ import { ContextualbarV2Skeleton, ContextualbarSkeleton as ContextualbarSkeletonComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; const ContextualbarSkeleton = (props: ComponentProps) => ( diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarTitle.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarTitle.tsx index bffcc5669ce4..d0570641de39 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarTitle.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarTitle.tsx @@ -1,7 +1,6 @@ import { ContextualbarV2Title, ContextualbarTitle as ContextualbarTitleComponent } from '@rocket.chat/fuselage'; import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; import type { ComponentProps } from 'react'; -import React from 'react'; const ContextualbarTitle = (props: ComponentProps) => ( diff --git a/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx b/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx index 99bcd5db6bf7..cf633206cc1d 100644 --- a/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx +++ b/apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx @@ -18,7 +18,6 @@ import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { useTranslation, useEndpoint } from '@rocket.chat/ui-contexts'; import { useMutation } from '@tanstack/react-query'; import type { ReactElement } from 'react'; -import React from 'react'; import { useForm, Controller } from 'react-hook-form'; import { goToRoomById } from '../../lib/utils/goToRoomById'; diff --git a/apps/meteor/client/components/CreateDiscussion/DefaultParentRoomField.tsx b/apps/meteor/client/components/CreateDiscussion/DefaultParentRoomField.tsx index 6036f14049a4..cb3816f17abe 100644 --- a/apps/meteor/client/components/CreateDiscussion/DefaultParentRoomField.tsx +++ b/apps/meteor/client/components/CreateDiscussion/DefaultParentRoomField.tsx @@ -2,7 +2,7 @@ import { Skeleton, TextInput, Callout } from '@rocket.chat/fuselage'; import { useTranslation, useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; import type { ReactElement } from 'react'; -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { roomCoordinator } from '../../lib/rooms/roomCoordinator'; diff --git a/apps/meteor/client/components/CustomScrollbars/CustomScrollbars.tsx b/apps/meteor/client/components/CustomScrollbars/CustomScrollbars.tsx index d443639794f1..881d8be66997 100644 --- a/apps/meteor/client/components/CustomScrollbars/CustomScrollbars.tsx +++ b/apps/meteor/client/components/CustomScrollbars/CustomScrollbars.tsx @@ -2,7 +2,7 @@ import { Palette } from '@rocket.chat/fuselage'; import type { ScrollValues } from 'rc-scrollbars'; import { Scrollbars } from 'rc-scrollbars'; import type { MutableRefObject, CSSProperties, ReactNode } from 'react'; -import React, { memo, forwardRef, useCallback, useMemo } from 'react'; +import { memo, forwardRef, useCallback, useMemo } from 'react'; export type CustomScrollbarsProps = { overflowX?: boolean; @@ -26,7 +26,7 @@ const CustomScrollbars = forwardRef(function const scrollbarsStyle = useMemo(() => ({ ...style, ...styleDefault }), [style]); const refSetter = useCallback( - (scrollbarRef) => { + (scrollbarRef: Scrollbars) => { if (ref && scrollbarRef) { if (typeof ref === 'function') { ref(scrollbarRef.view ?? null); diff --git a/apps/meteor/client/components/CustomScrollbars/VirtuosoScrollbars.tsx b/apps/meteor/client/components/CustomScrollbars/VirtuosoScrollbars.tsx index 06080ede2510..0931e7cfd0f0 100644 --- a/apps/meteor/client/components/CustomScrollbars/VirtuosoScrollbars.tsx +++ b/apps/meteor/client/components/CustomScrollbars/VirtuosoScrollbars.tsx @@ -1,5 +1,5 @@ import type { ComponentProps, Ref } from 'react'; -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import CustomScrollbars from './CustomScrollbars'; diff --git a/apps/meteor/client/components/Emoji.tsx b/apps/meteor/client/components/Emoji.tsx index 69eeadc9d9fb..46e36459537c 100644 --- a/apps/meteor/client/components/Emoji.tsx +++ b/apps/meteor/client/components/Emoji.tsx @@ -1,6 +1,5 @@ import styled from '@rocket.chat/styled'; import type { ReactElement } from 'react'; -import React from 'react'; import { getEmojiClassNameAndDataTitle } from '../lib/utils/renderEmoji'; diff --git a/apps/meteor/client/components/FeaturePreviewSidePanelNavigation.tsx b/apps/meteor/client/components/FeaturePreviewSidePanelNavigation.tsx index f5d658ccb2f2..adffeea33cfd 100644 --- a/apps/meteor/client/components/FeaturePreviewSidePanelNavigation.tsx +++ b/apps/meteor/client/components/FeaturePreviewSidePanelNavigation.tsx @@ -1,6 +1,5 @@ import { FeaturePreview } from '@rocket.chat/ui-client'; import type { ReactElement } from 'react'; -import React from 'react'; import { useSidePanelNavigationScreenSize } from '../hooks/useSidePanelNavigation'; diff --git a/apps/meteor/client/components/FilterByText.tsx b/apps/meteor/client/components/FilterByText.tsx index 08c3cb78e21f..53d430100777 100644 --- a/apps/meteor/client/components/FilterByText.tsx +++ b/apps/meteor/client/components/FilterByText.tsx @@ -1,7 +1,7 @@ import { Box, Icon, TextInput, Margins } from '@rocket.chat/fuselage'; import { useAutoFocus, useMergedRefs } from '@rocket.chat/fuselage-hooks'; import type { ChangeEvent, ComponentPropsWithoutRef, FormEvent } from 'react'; -import React, { forwardRef, memo, useCallback } from 'react'; +import { forwardRef, memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; // TODO: consider changing the type of TextInput's `onChange` to (event: ChangeEvent) => void diff --git a/apps/meteor/client/components/FingerprintChangeModal.tsx b/apps/meteor/client/components/FingerprintChangeModal.tsx index a45a17db8ccc..834f130bb9f1 100644 --- a/apps/meteor/client/components/FingerprintChangeModal.tsx +++ b/apps/meteor/client/components/FingerprintChangeModal.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { ReactElement } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import GenericModal from './GenericModal'; diff --git a/apps/meteor/client/components/FingerprintChangeModalConfirmation.tsx b/apps/meteor/client/components/FingerprintChangeModalConfirmation.tsx index 6acc413c82be..7b0d93146a59 100644 --- a/apps/meteor/client/components/FingerprintChangeModalConfirmation.tsx +++ b/apps/meteor/client/components/FingerprintChangeModalConfirmation.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { ReactElement } from 'react'; -import React from 'react'; import { useTranslation } from 'react-i18next'; import GenericModal from './GenericModal'; diff --git a/apps/meteor/client/components/GazzodownText.tsx b/apps/meteor/client/components/GazzodownText.tsx index 05c6788062a9..a5dbab70ff42 100644 --- a/apps/meteor/client/components/GazzodownText.tsx +++ b/apps/meteor/client/components/GazzodownText.tsx @@ -6,7 +6,7 @@ import { escapeRegExp } from '@rocket.chat/string-helpers'; import { useFeaturePreview } from '@rocket.chat/ui-client'; import { useLayout, useRouter, useSetting, useUserPreference, useUserId } from '@rocket.chat/ui-contexts'; import type { UIEvent } from 'react'; -import React, { useCallback, memo, useMemo } from 'react'; +import { useCallback, memo, useMemo } from 'react'; import { detectEmoji } from '../lib/utils/detectEmoji'; import { fireGlobalEvent } from '../lib/utils/fireGlobalEvent'; diff --git a/apps/meteor/client/components/GenericCard/GenericCard.tsx b/apps/meteor/client/components/GenericCard/GenericCard.tsx index 48e1d77d63fb..637c4c14e602 100644 --- a/apps/meteor/client/components/GenericCard/GenericCard.tsx +++ b/apps/meteor/client/components/GenericCard/GenericCard.tsx @@ -1,7 +1,6 @@ import { Card, CardTitle, CardBody, CardControls, CardHeader, FramedIcon } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import type { ComponentProps, ReactElement } from 'react'; -import React from 'react'; import type { GenericCardButton } from './GenericCardButton'; diff --git a/apps/meteor/client/components/GenericCard/GenericCardButton.tsx b/apps/meteor/client/components/GenericCard/GenericCardButton.tsx index b89ec26b6e9b..5cf6baf43e3f 100644 --- a/apps/meteor/client/components/GenericCard/GenericCardButton.tsx +++ b/apps/meteor/client/components/GenericCard/GenericCardButton.tsx @@ -1,5 +1,4 @@ import { Button } from '@rocket.chat/fuselage'; import type { ComponentProps } from 'react'; -import React from 'react'; export const GenericCardButton = (props: ComponentProps) =>