From aa8409a52f4fb46339545af1d8d6f71cc7f685b6 Mon Sep 17 00:00:00 2001 From: Grzegorz Zdunek Date: Fri, 13 Dec 2024 16:28:57 +0100 Subject: [PATCH] Remove unused `React` imports from `packages/teleterm` --- .../src/ui/AccessRequestCheckout/AssumedRolesBar.tsx | 1 - .../teleterm/src/ui/AppInitializer/AppInitializer.tsx | 2 +- .../src/ui/ClusterConnect/ClusterAdd/ClusterAdd.story.tsx | 2 +- .../FormLogin/FormPasswordless/FormPasswordless.tsx | 1 - .../teleterm/src/ui/ClusterLogout/ClusterLogout.story.tsx | 2 -- web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.tsx | 1 - .../src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx | 1 - .../src/ui/ConnectMyComputer/CompatibilityPromise.tsx | 1 - .../DocumentConnectMyComputer/DocumentConnectMyComputer.tsx | 2 +- .../DocumentConnectMyComputer/Setup.story.tsx | 2 +- .../ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.tsx | 2 +- .../DocumentConnectMyComputer/Status.story.tsx | 2 +- web/packages/teleterm/src/ui/ConnectMyComputer/Logs.tsx | 1 - .../src/ui/ConnectMyComputer/NavigationMenu.story.tsx | 2 +- .../teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx | 2 +- .../src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx | 1 - .../src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx | 1 - .../src/ui/DocumentAccessRequests/DocumentAccessRequests.tsx | 2 -- .../DocumentAccessRequests/RequestList/RequestList.test.tsx | 1 - .../ui/DocumentAccessRequests/RequestList/RequestList.tsx | 1 - .../src/ui/DocumentCluster/DocumentCluster.story.tsx | 2 +- .../teleterm/src/ui/DocumentCluster/DocumentCluster.test.tsx | 1 - .../teleterm/src/ui/DocumentCluster/DocumentCluster.tsx | 2 +- .../src/ui/DocumentCluster/resourcesContext.test.tsx | 1 - web/packages/teleterm/src/ui/DocumentGateway/CliCommand.tsx | 2 +- .../src/ui/DocumentGateway/DocumentGateway.story.tsx | 2 -- .../teleterm/src/ui/DocumentGateway/DocumentGateway.tsx | 2 -- .../src/ui/DocumentGateway/OnlineDocumentGateway.tsx | 2 +- .../src/ui/DocumentGateway/useDocumentGateway.test.tsx | 1 - .../src/ui/DocumentGatewayApp/DocumentGatewayApp.story.tsx | 2 -- .../DocumentGatewayCliClient.story.tsx | 2 -- .../ui/DocumentGatewayCliClient/DocumentGatewayCliClient.tsx | 2 +- .../src/ui/DocumentGatewayKube/DocumentGatewayKube.story.tsx | 2 -- .../src/ui/DocumentGatewayKube/DocumentGatewayKube.tsx | 2 +- .../teleterm/src/ui/DocumentTerminal/DocumentTerminal.tsx | 2 +- web/packages/teleterm/src/ui/DocumentTerminal/Reconnect.tsx | 1 - .../src/ui/DocumentTerminal/useDocumentTerminal.test.tsx | 1 - .../teleterm/src/ui/Documents/KeyboardShortcutsPanel.tsx | 1 - .../src/ui/DocumentsReopen/DocumentsReopen.story.tsx | 2 -- .../teleterm/src/ui/DocumentsReopen/DocumentsReopen.tsx | 1 - .../teleterm/src/ui/HeadlessAuthn/HeadlessAuthentication.tsx | 2 +- .../ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.story.tsx | 2 -- .../src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.tsx | 2 +- web/packages/teleterm/src/ui/LayoutManager.tsx | 2 +- web/packages/teleterm/src/ui/ModalsHost/ModalsHost.story.tsx | 2 -- web/packages/teleterm/src/ui/ModalsHost/ModalsHost.test.tsx | 1 - web/packages/teleterm/src/ui/ModalsHost/ModalsHost.tsx | 2 +- .../src/ui/ModalsHost/modals/UsageData/UsageData.story.tsx | 2 -- .../src/ui/ModalsHost/modals/UsageData/UsageData.tsx | 1 - .../ui/ModalsHost/modals/UserJobRole/UserJobRole.story.tsx | 2 -- .../src/ui/ModalsHost/modals/UserJobRole/UserJobRole.tsx | 2 +- .../teleterm/src/ui/Search/ResourceSearchErrors.story.tsx | 2 -- web/packages/teleterm/src/ui/Search/ResourceSearchErrors.tsx | 1 - web/packages/teleterm/src/ui/Search/SearchBar.test.tsx | 1 - web/packages/teleterm/src/ui/Search/SearchContext.test.tsx | 2 +- web/packages/teleterm/src/ui/Search/SearchContext.tsx | 2 +- .../teleterm/src/ui/Search/pickers/ParameterPicker.tsx | 2 +- .../teleterm/src/ui/Search/pickers/results.story.tsx | 2 +- .../src/ui/Search/pickers/useDisplayResults.test.tsx | 1 - web/packages/teleterm/src/ui/Search/useSearch.test.tsx | 1 - .../src/ui/StatusBar/AccessRequestCheckoutButton.tsx | 2 -- .../src/ui/StatusBar/ShareFeedback/ShareFeedback.tsx | 2 +- .../src/ui/StatusBar/ShareFeedback/ShareFeedbackForm.tsx | 1 - .../ui/StatusBar/ShareFeedback/ShareFeedbackFormFields.tsx | 1 - web/packages/teleterm/src/ui/StatusBar/StatusBar.tsx | 1 - .../ui/TabHost/ClusterConnectPanel/ClusterConnectPanel.tsx | 1 - .../src/ui/TabHost/ClusterConnectPanel/RecentClusters.tsx | 2 -- web/packages/teleterm/src/ui/Tabs/TabItem.tsx | 2 +- web/packages/teleterm/src/ui/Tabs/Tabs.tsx | 1 - .../teleterm/src/ui/TopBar/AdditionalActions.story.tsx | 1 - .../ui/TopBar/Clusters/ClusterSelector/ClusterSelector.tsx | 2 +- web/packages/teleterm/src/ui/TopBar/Clusters/Clusters.tsx | 2 +- .../ClustersFilterableList/ClustersFilterableList.tsx | 2 -- .../TopBar/Connections/ConnectionsIcon/ConnectionsIcon.tsx | 2 +- .../TopBar/Identity/EmptyIdentityList/EmptyIdentityList.tsx | 1 - .../teleterm/src/ui/TopBar/Identity/Identity.story.tsx | 2 +- web/packages/teleterm/src/ui/TopBar/Identity/Identity.tsx | 5 +++-- .../ui/TopBar/Identity/IdentityList/AddNewClusterItem.tsx | 2 -- .../ui/TopBar/Identity/IdentitySelector/IdentitySelector.tsx | 2 +- .../src/ui/TopBar/Identity/IdentitySelector/PamIcon.tsx | 1 - .../src/ui/TopBar/Identity/IdentitySelector/UserIcon.tsx | 1 - .../teleterm/src/ui/components/CatchError/CatchError.jsx | 4 ++-- web/packages/teleterm/src/ui/components/FieldInputs.tsx | 2 +- .../src/ui/components/FilterableList/FilterableList.test.tsx | 1 - .../src/ui/components/FilterableList/FilterableList.tsx | 2 +- .../KeyboardArrowsNavigation.test.tsx | 5 +++-- .../src/ui/components/Notifcations/Notifications.story.tsx | 2 +- .../src/ui/components/Notifcations/Notifications.tsx | 1 - .../src/ui/components/Notifcations/NotificationsHost.tsx | 2 -- web/packages/teleterm/src/ui/components/OfflineGateway.tsx | 2 +- .../services/keyboardShortcuts/useKeyboardShortcuts.test.tsx | 2 -- 91 files changed, 43 insertions(+), 113 deletions(-) diff --git a/web/packages/teleterm/src/ui/AccessRequestCheckout/AssumedRolesBar.tsx b/web/packages/teleterm/src/ui/AccessRequestCheckout/AssumedRolesBar.tsx index 0c0cddbb11192..833c719d0b8dc 100644 --- a/web/packages/teleterm/src/ui/AccessRequestCheckout/AssumedRolesBar.tsx +++ b/web/packages/teleterm/src/ui/AccessRequestCheckout/AssumedRolesBar.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Box, Flex, Text } from 'design'; import { pluralize } from 'shared/utils/text'; diff --git a/web/packages/teleterm/src/ui/AppInitializer/AppInitializer.tsx b/web/packages/teleterm/src/ui/AppInitializer/AppInitializer.tsx index c931f0fcab39a..ef067f0642fbc 100644 --- a/web/packages/teleterm/src/ui/AppInitializer/AppInitializer.tsx +++ b/web/packages/teleterm/src/ui/AppInitializer/AppInitializer.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; import { Indicator } from 'design'; diff --git a/web/packages/teleterm/src/ui/ClusterConnect/ClusterAdd/ClusterAdd.story.tsx b/web/packages/teleterm/src/ui/ClusterConnect/ClusterAdd/ClusterAdd.story.tsx index 163e56d13465e..f9dea4b53193e 100644 --- a/web/packages/teleterm/src/ui/ClusterConnect/ClusterAdd/ClusterAdd.story.tsx +++ b/web/packages/teleterm/src/ui/ClusterConnect/ClusterAdd/ClusterAdd.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { PropsWithChildren } from 'react'; +import { PropsWithChildren } from 'react'; import Dialog from 'design/Dialog'; diff --git a/web/packages/teleterm/src/ui/ClusterConnect/ClusterLogin/FormLogin/FormPasswordless/FormPasswordless.tsx b/web/packages/teleterm/src/ui/ClusterConnect/ClusterLogin/FormLogin/FormPasswordless/FormPasswordless.tsx index 8160d0c7506e2..cf39b2a140a29 100644 --- a/web/packages/teleterm/src/ui/ClusterConnect/ClusterLogin/FormLogin/FormPasswordless/FormPasswordless.tsx +++ b/web/packages/teleterm/src/ui/ClusterConnect/ClusterLogin/FormLogin/FormPasswordless/FormPasswordless.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Text, Flex, ButtonText, Box } from 'design'; import { Key, ArrowForward } from 'design/Icon'; diff --git a/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.story.tsx b/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.story.tsx index 0175c5f6ef384..d4eb46914cb49 100644 --- a/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.story.tsx +++ b/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider'; import { ClusterLogout } from './ClusterLogout'; diff --git a/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.tsx b/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.tsx index 877b9bd9a6d7a..1cd077c6149bc 100644 --- a/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.tsx +++ b/web/packages/teleterm/src/ui/ClusterLogout/ClusterLogout.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import DialogConfirmation, { DialogContent, DialogFooter, diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx index cff7eeaeaeca5..77821a082e5bf 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { screen } from '@testing-library/react'; import { render } from 'design/utils/testing'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.tsx index b2b9731414d15..dbd3bfb5a0777 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/CompatibilityPromise.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, ButtonPrimary, Alert, Flex } from 'design'; import Link from 'design/Link'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/DocumentConnectMyComputer.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/DocumentConnectMyComputer.tsx index cf95f0e64a6ee..768e0c6d59f05 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/DocumentConnectMyComputer.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/DocumentConnectMyComputer.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import Indicator from 'design/Indicator'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.story.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.story.tsx index 2ae06420f2445..59dae741e9283 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.story.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useRef, useLayoutEffect } from 'react'; +import { useEffect, useRef, useLayoutEffect } from 'react'; import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider'; import { MockAppContext } from 'teleterm/ui/fixtures/mocks'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.tsx index 8e8c7ba3c3e33..42097cf8d200f 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Setup.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; import { Box, ButtonPrimary, Flex, Text, Alert, H1 } from 'design'; import { Attempt, makeEmptyAttempt, useAsync } from 'shared/hooks/useAsync'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Status.story.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Status.story.tsx index 0f46c1cdf5376..9076e099e1d64 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Status.story.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/DocumentConnectMyComputer/Status.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useLayoutEffect } from 'react'; +import { useLayoutEffect } from 'react'; import { makeRootCluster, diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/Logs.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/Logs.tsx index 3db3194709b2f..5cf46cd529c99 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/Logs.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/Logs.tsx @@ -17,7 +17,6 @@ */ import { Flex, Text } from 'design'; -import React from 'react'; interface LogsProps { logs: string; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.story.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.story.tsx index 3daaebdbadec7..057bbad92f54f 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.story.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useRef, useLayoutEffect } from 'react'; +import { useEffect, useRef, useLayoutEffect } from 'react'; import { MockWorkspaceContextProvider } from 'teleterm/ui/fixtures/MockWorkspaceContextProvider'; import { makeRootCluster } from 'teleterm/services/tshd/testHelpers'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx index cea6017fd46e7..4066d3db6692a 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/NavigationMenu.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { forwardRef, useRef, useState } from 'react'; +import { forwardRef, useRef, useState } from 'react'; import styled, { css } from 'styled-components'; import { Box, Button, Indicator, Menu, MenuItem, blink } from 'design'; import { Laptop, Warning } from 'design/Icon'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx index fdff6097572d0..b70c4e3be2ad9 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render } from 'design/utils/testing'; import { screen } from '@testing-library/react'; diff --git a/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx index bd279dd04b105..6ffc9ddf785cb 100644 --- a/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx +++ b/web/packages/teleterm/src/ui/ConnectMyComputer/UpgradeAgentSuggestion.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Alert, Text } from 'design'; import Link from 'design/Link'; diff --git a/web/packages/teleterm/src/ui/DocumentAccessRequests/DocumentAccessRequests.tsx b/web/packages/teleterm/src/ui/DocumentAccessRequests/DocumentAccessRequests.tsx index f9aa75338cf97..b3e01af9d6cb9 100644 --- a/web/packages/teleterm/src/ui/DocumentAccessRequests/DocumentAccessRequests.tsx +++ b/web/packages/teleterm/src/ui/DocumentAccessRequests/DocumentAccessRequests.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Attempt } from 'shared/hooks/useAsync'; import { AccessRequest } from 'shared/services/accessRequests'; diff --git a/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.test.tsx b/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.test.tsx index 12f6765db50b3..30cb79a4e3a2f 100644 --- a/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.test.tsx +++ b/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { fireEvent, render, screen } from 'design/utils/testing'; diff --git a/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.tsx b/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.tsx index f2c52fb16ff82..8a0df6adbc8b0 100644 --- a/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.tsx +++ b/web/packages/teleterm/src/ui/DocumentAccessRequests/RequestList/RequestList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Label, Alert, ButtonBorder, Flex, ButtonPrimary, Box } from 'design'; diff --git a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx index f2472378077d8..d81283a01f4c8 100644 --- a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx +++ b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import styled from 'styled-components'; import AppContextProvider from 'teleterm/ui/appContextProvider'; diff --git a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.test.tsx b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.test.tsx index 1c4903d5b59c8..fa8cf8ecb858f 100644 --- a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.test.tsx +++ b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { act } from '@testing-library/react'; import { render, screen } from 'design/utils/testing'; import { mockIntersectionObserver } from 'jsdom-testing-mocks'; diff --git a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.tsx b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.tsx index 6b051d9388055..7853310bdfb52 100644 --- a/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.tsx +++ b/web/packages/teleterm/src/ui/DocumentCluster/DocumentCluster.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import styled from 'styled-components'; import { Box, ButtonPrimary, Flex, Text, Alert, H2 } from 'design'; import { useAsync, Attempt } from 'shared/hooks/useAsync'; diff --git a/web/packages/teleterm/src/ui/DocumentCluster/resourcesContext.test.tsx b/web/packages/teleterm/src/ui/DocumentCluster/resourcesContext.test.tsx index 37d1339db9611..12c220e43632b 100644 --- a/web/packages/teleterm/src/ui/DocumentCluster/resourcesContext.test.tsx +++ b/web/packages/teleterm/src/ui/DocumentCluster/resourcesContext.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { renderHook } from '@testing-library/react'; import { rootClusterUri } from 'teleterm/services/tshd/testHelpers'; diff --git a/web/packages/teleterm/src/ui/DocumentGateway/CliCommand.tsx b/web/packages/teleterm/src/ui/DocumentGateway/CliCommand.tsx index c770f87095d31..8be53cdfdfed6 100644 --- a/web/packages/teleterm/src/ui/DocumentGateway/CliCommand.tsx +++ b/web/packages/teleterm/src/ui/DocumentGateway/CliCommand.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { Box, ButtonPrimary, Flex, Indicator } from 'design'; import { fade } from 'design/theme/utils/colorManipulator'; import styled from 'styled-components'; diff --git a/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.story.tsx b/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.story.tsx index 40be4308b7be7..e91917475e0ae 100644 --- a/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.story.tsx +++ b/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { makeEmptyAttempt, makeProcessingAttempt, diff --git a/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.tsx b/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.tsx index 7da5e54696438..999c9762d44bb 100644 --- a/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.tsx +++ b/web/packages/teleterm/src/ui/DocumentGateway/DocumentGateway.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Document from 'teleterm/ui/Document'; import * as types from 'teleterm/ui/services/workspacesService'; diff --git a/web/packages/teleterm/src/ui/DocumentGateway/OnlineDocumentGateway.tsx b/web/packages/teleterm/src/ui/DocumentGateway/OnlineDocumentGateway.tsx index 75be3167eea5e..dee93541eb9f7 100644 --- a/web/packages/teleterm/src/ui/DocumentGateway/OnlineDocumentGateway.tsx +++ b/web/packages/teleterm/src/ui/DocumentGateway/OnlineDocumentGateway.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useMemo, useRef } from 'react'; +import { useMemo, useRef } from 'react'; import { debounce } from 'shared/utils/highbar'; import { Box, ButtonSecondary, Flex, H1, H2, Link, Text } from 'design'; import Validation from 'shared/components/Validation'; diff --git a/web/packages/teleterm/src/ui/DocumentGateway/useDocumentGateway.test.tsx b/web/packages/teleterm/src/ui/DocumentGateway/useDocumentGateway.test.tsx index f2c0ed0023bb4..483a79e30993f 100644 --- a/web/packages/teleterm/src/ui/DocumentGateway/useDocumentGateway.test.tsx +++ b/web/packages/teleterm/src/ui/DocumentGateway/useDocumentGateway.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { renderHook, act, waitFor } from '@testing-library/react'; import { diff --git a/web/packages/teleterm/src/ui/DocumentGatewayApp/DocumentGatewayApp.story.tsx b/web/packages/teleterm/src/ui/DocumentGatewayApp/DocumentGatewayApp.story.tsx index 99d07789e7047..8400181f316cf 100644 --- a/web/packages/teleterm/src/ui/DocumentGatewayApp/DocumentGatewayApp.story.tsx +++ b/web/packages/teleterm/src/ui/DocumentGatewayApp/DocumentGatewayApp.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { wait } from 'shared/utils/wait'; import { DocumentGatewayApp } from 'teleterm/ui/DocumentGatewayApp/DocumentGatewayApp'; diff --git a/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.story.tsx b/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.story.tsx index 0577f7508df9a..b79a6abd7d4a9 100644 --- a/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.story.tsx +++ b/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { DocumentGatewayCliClient } from 'teleterm/ui/services/workspacesService'; import { WaitingForGatewayContent } from './DocumentGatewayCliClient'; diff --git a/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.tsx b/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.tsx index cf0ef61e4c0b0..98ad8c3dabf87 100644 --- a/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.tsx +++ b/web/packages/teleterm/src/ui/DocumentGatewayCliClient/DocumentGatewayCliClient.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import styled from 'styled-components'; import { Flex, Text, ButtonPrimary } from 'design'; diff --git a/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.story.tsx b/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.story.tsx index a7a2ad9676485..0a6e04c06a355 100644 --- a/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.story.tsx +++ b/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import * as types from 'teleterm/ui/services/workspacesService'; import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider'; import { MockAppContext } from 'teleterm/ui/fixtures/mocks'; diff --git a/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.tsx b/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.tsx index 0ea71ffc33c93..e05b0a59adf09 100644 --- a/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.tsx +++ b/web/packages/teleterm/src/ui/DocumentGatewayKube/DocumentGatewayKube.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { useAsync } from 'shared/hooks/useAsync'; diff --git a/web/packages/teleterm/src/ui/DocumentTerminal/DocumentTerminal.tsx b/web/packages/teleterm/src/ui/DocumentTerminal/DocumentTerminal.tsx index def77da4ec252..707ab6380c880 100644 --- a/web/packages/teleterm/src/ui/DocumentTerminal/DocumentTerminal.tsx +++ b/web/packages/teleterm/src/ui/DocumentTerminal/DocumentTerminal.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { FileTransferActionBar, FileTransfer, diff --git a/web/packages/teleterm/src/ui/DocumentTerminal/Reconnect.tsx b/web/packages/teleterm/src/ui/DocumentTerminal/Reconnect.tsx index a16201239418a..481829590a014 100644 --- a/web/packages/teleterm/src/ui/DocumentTerminal/Reconnect.tsx +++ b/web/packages/teleterm/src/ui/DocumentTerminal/Reconnect.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex, Text, ButtonPrimary } from 'design'; import { Danger } from 'design/Alert'; import { Attempt } from 'shared/hooks/useAsync'; diff --git a/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx b/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx index 1b4e1560ad797..f2bba179b6a01 100644 --- a/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx +++ b/web/packages/teleterm/src/ui/DocumentTerminal/useDocumentTerminal.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { renderHook, waitFor } from '@testing-library/react'; import 'jest-canvas-mock'; diff --git a/web/packages/teleterm/src/ui/Documents/KeyboardShortcutsPanel.tsx b/web/packages/teleterm/src/ui/Documents/KeyboardShortcutsPanel.tsx index 85733395df6ad..4e1913307fdde 100644 --- a/web/packages/teleterm/src/ui/Documents/KeyboardShortcutsPanel.tsx +++ b/web/packages/teleterm/src/ui/Documents/KeyboardShortcutsPanel.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text } from 'design'; import styled from 'styled-components'; diff --git a/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.story.tsx b/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.story.tsx index bf2c2e0c63015..7cd0d1e74ae5d 100644 --- a/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.story.tsx +++ b/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider'; import { DocumentsReopen } from './DocumentsReopen'; diff --git a/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.tsx b/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.tsx index 9f29f89d4c604..9898d2c16dd72 100644 --- a/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.tsx +++ b/web/packages/teleterm/src/ui/DocumentsReopen/DocumentsReopen.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import DialogConfirmation, { DialogContent, DialogFooter, diff --git a/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessAuthentication.tsx b/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessAuthentication.tsx index 1cb1a0e5e20c4..2e7cf90babd27 100644 --- a/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessAuthentication.tsx +++ b/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessAuthentication.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef, useEffect } from 'react'; +import { useRef, useEffect } from 'react'; import { useAsync } from 'shared/hooks/useAsync'; diff --git a/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.story.tsx b/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.story.tsx index 491202ddfdbe1..c212389989fe2 100644 --- a/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.story.tsx +++ b/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { makeEmptyAttempt } from 'shared/hooks/useAsync'; import { makeRootCluster } from 'teleterm/services/tshd/testHelpers'; diff --git a/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.tsx b/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.tsx index 6c2c1ae7ffffb..1645807756a5f 100644 --- a/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.tsx +++ b/web/packages/teleterm/src/ui/HeadlessAuthn/HeadlessPrompt/HeadlessPrompt.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import * as Alerts from 'design/Alert'; import { ButtonIcon, diff --git a/web/packages/teleterm/src/ui/LayoutManager.tsx b/web/packages/teleterm/src/ui/LayoutManager.tsx index ffbf1893daccd..e75ca7a8ae767 100644 --- a/web/packages/teleterm/src/ui/LayoutManager.tsx +++ b/web/packages/teleterm/src/ui/LayoutManager.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef } from 'react'; +import { useRef } from 'react'; import { Flex } from 'design'; import { AccessRequestCheckout } from 'teleterm/ui/AccessRequestCheckout'; diff --git a/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.story.tsx b/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.story.tsx index b09eeff930c91..03e0f7f7ea2db 100644 --- a/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.story.tsx +++ b/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider'; import { MockAppContext } from 'teleterm/ui/fixtures/mocks'; import { diff --git a/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.test.tsx b/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.test.tsx index de5743e01dac0..90dc4931914b0 100644 --- a/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.test.tsx +++ b/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render, screen } from 'design/utils/testing'; import { act } from '@testing-library/react'; diff --git a/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.tsx b/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.tsx index ba276907d9037..81fc3bfb5827e 100644 --- a/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.tsx +++ b/web/packages/teleterm/src/ui/ModalsHost/ModalsHost.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { Fragment } from 'react'; +import { Fragment } from 'react'; import { useAppContext } from 'teleterm/ui/appContextProvider'; diff --git a/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.story.tsx b/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.story.tsx index d02869e8e0776..97c84290a0ff6 100644 --- a/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.story.tsx +++ b/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { UsageData } from './UsageData'; export default { diff --git a/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.tsx b/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.tsx index ce5cbaa07d0e2..c3125d8aa92c7 100644 --- a/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.tsx +++ b/web/packages/teleterm/src/ui/ModalsHost/modals/UsageData/UsageData.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import DialogConfirmation, { DialogContent, DialogFooter, diff --git a/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.story.tsx b/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.story.tsx index 700e3f2551c23..0aaecd661a538 100644 --- a/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.story.tsx +++ b/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { UserJobRole } from './UserJobRole'; export default { diff --git a/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.tsx b/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.tsx index 7cab9bcb87608..81b6c7b99a546 100644 --- a/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.tsx +++ b/web/packages/teleterm/src/ui/ModalsHost/modals/UserJobRole/UserJobRole.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef, useState } from 'react'; +import { useRef, useState } from 'react'; import styled from 'styled-components'; import { ButtonIcon, ButtonPrimary, ButtonSecondary, H2, Input } from 'design'; import DialogConfirmation, { diff --git a/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.story.tsx b/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.story.tsx index 3864ded2f2bc5..9dff88de7b2c0 100644 --- a/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.story.tsx +++ b/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { routing } from 'teleterm/ui/uri'; import { ResourceSearchError } from 'teleterm/ui/services/resources'; diff --git a/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.tsx b/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.tsx index e4790782e40f6..9903b70f36bb7 100644 --- a/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.tsx +++ b/web/packages/teleterm/src/ui/Search/ResourceSearchErrors.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import DialogConfirmation, { DialogContent, DialogFooter, diff --git a/web/packages/teleterm/src/ui/Search/SearchBar.test.tsx b/web/packages/teleterm/src/ui/Search/SearchBar.test.tsx index 00524ce787187..28e49399fd98b 100644 --- a/web/packages/teleterm/src/ui/Search/SearchBar.test.tsx +++ b/web/packages/teleterm/src/ui/Search/SearchBar.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import userEvent from '@testing-library/user-event'; import { render, screen, waitFor, act } from 'design/utils/testing'; import { makeSuccessAttempt } from 'shared/hooks/useAsync'; diff --git a/web/packages/teleterm/src/ui/Search/SearchContext.test.tsx b/web/packages/teleterm/src/ui/Search/SearchContext.test.tsx index caa7cf9dd02a8..dd0252d438d0e 100644 --- a/web/packages/teleterm/src/ui/Search/SearchContext.test.tsx +++ b/web/packages/teleterm/src/ui/Search/SearchContext.test.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { PropsWithChildren } from 'react'; +import { PropsWithChildren } from 'react'; import '@testing-library/jest-dom'; import { fireEvent, createEvent, render, screen } from '@testing-library/react'; import { renderHook, act } from '@testing-library/react'; diff --git a/web/packages/teleterm/src/ui/Search/SearchContext.tsx b/web/packages/teleterm/src/ui/Search/SearchContext.tsx index 49bdea9fe1df2..a24d1787dacd1 100644 --- a/web/packages/teleterm/src/ui/Search/SearchContext.tsx +++ b/web/packages/teleterm/src/ui/Search/SearchContext.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { +import { useContext, useState, FC, diff --git a/web/packages/teleterm/src/ui/Search/pickers/ParameterPicker.tsx b/web/packages/teleterm/src/ui/Search/pickers/ParameterPicker.tsx index 050a817c17f47..dca9846f2247b 100644 --- a/web/packages/teleterm/src/ui/Search/pickers/ParameterPicker.tsx +++ b/web/packages/teleterm/src/ui/Search/pickers/ParameterPicker.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { ReactElement, useCallback, useEffect } from 'react'; +import { ReactElement, useCallback, useEffect } from 'react'; import { Highlight } from 'shared/components/Highlight'; import { makeSuccessAttempt, diff --git a/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx b/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx index ac2f734049fa7..c74d0a29777e8 100644 --- a/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx +++ b/web/packages/teleterm/src/ui/Search/pickers/results.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { makeSuccessAttempt } from 'shared/hooks/useAsync'; import { Flex } from 'design'; diff --git a/web/packages/teleterm/src/ui/Search/pickers/useDisplayResults.test.tsx b/web/packages/teleterm/src/ui/Search/pickers/useDisplayResults.test.tsx index 67928b71a7dfe..8208b96d84094 100644 --- a/web/packages/teleterm/src/ui/Search/pickers/useDisplayResults.test.tsx +++ b/web/packages/teleterm/src/ui/Search/pickers/useDisplayResults.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { renderHook } from '@testing-library/react'; import { MockAppContext } from 'teleterm/ui/fixtures/mocks'; diff --git a/web/packages/teleterm/src/ui/Search/useSearch.test.tsx b/web/packages/teleterm/src/ui/Search/useSearch.test.tsx index 6030b4aded786..3cc784bb4f8b3 100644 --- a/web/packages/teleterm/src/ui/Search/useSearch.test.tsx +++ b/web/packages/teleterm/src/ui/Search/useSearch.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { renderHook } from '@testing-library/react'; import { ShowResources } from 'gen-proto-ts/teleport/lib/teleterm/v1/cluster_pb'; diff --git a/web/packages/teleterm/src/ui/StatusBar/AccessRequestCheckoutButton.tsx b/web/packages/teleterm/src/ui/StatusBar/AccessRequestCheckoutButton.tsx index 8c60aec82b726..d817c8f05740d 100644 --- a/web/packages/teleterm/src/ui/StatusBar/AccessRequestCheckoutButton.tsx +++ b/web/packages/teleterm/src/ui/StatusBar/AccessRequestCheckoutButton.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { ButtonPrimary, Text } from 'design'; import { ListAddCheck } from 'design/Icon'; diff --git a/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedback.tsx b/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedback.tsx index 3dcca5c57bb15..5e508eba644bf 100644 --- a/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedback.tsx +++ b/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedback.tsx @@ -18,7 +18,7 @@ import { ButtonIcon, Popover } from 'design'; import { ChatBubble } from 'design/Icon'; -import React, { useRef } from 'react'; +import { useRef } from 'react'; import styled from 'styled-components'; import { ShareFeedbackForm } from './ShareFeedbackForm'; diff --git a/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackForm.tsx b/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackForm.tsx index 4722de3d80da2..fd95d43cc4f8b 100644 --- a/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackForm.tsx +++ b/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackForm.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonIcon, ButtonPrimary, Flex, H2, Link } from 'design'; import Validation from 'shared/components/Validation'; import { Cross } from 'design/Icon'; diff --git a/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackFormFields.tsx b/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackFormFields.tsx index 6bd85195603de..56c9e7c535063 100644 --- a/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackFormFields.tsx +++ b/web/packages/teleterm/src/ui/StatusBar/ShareFeedback/ShareFeedbackFormFields.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import FieldInput from 'shared/components/FieldInput'; import { requiredField } from 'shared/components/Validation/rules'; import { FieldTextArea } from 'shared/components/FieldTextArea'; diff --git a/web/packages/teleterm/src/ui/StatusBar/StatusBar.tsx b/web/packages/teleterm/src/ui/StatusBar/StatusBar.tsx index 6dd601bf9689e..7787285af1969 100644 --- a/web/packages/teleterm/src/ui/StatusBar/StatusBar.tsx +++ b/web/packages/teleterm/src/ui/StatusBar/StatusBar.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex, Text } from 'design'; import { useActiveDocumentClusterBreadcrumbs } from './useActiveDocumentClusterBreadcrumbs'; diff --git a/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/ClusterConnectPanel.tsx b/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/ClusterConnectPanel.tsx index 93fe61d140de4..2c86daeb67a30 100644 --- a/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/ClusterConnectPanel.tsx +++ b/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/ClusterConnectPanel.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box, ButtonPrimary, Flex, H1, ResourceIcon, Text } from 'design'; import styled from 'styled-components'; diff --git a/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/RecentClusters.tsx b/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/RecentClusters.tsx index 6dd142135672c..13d8c6df6ac96 100644 --- a/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/RecentClusters.tsx +++ b/web/packages/teleterm/src/ui/TabHost/ClusterConnectPanel/RecentClusters.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Box, ButtonBorder, Card, Text, Flex } from 'design'; import { useAppContext } from 'teleterm/ui/appContextProvider'; diff --git a/web/packages/teleterm/src/ui/Tabs/TabItem.tsx b/web/packages/teleterm/src/ui/Tabs/TabItem.tsx index 9d397c2d5bb4b..dc1c0ddc44c02 100644 --- a/web/packages/teleterm/src/ui/Tabs/TabItem.tsx +++ b/web/packages/teleterm/src/ui/Tabs/TabItem.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef } from 'react'; +import { useRef } from 'react'; import styled from 'styled-components'; import * as Icons from 'design/Icon'; import { ButtonIcon, Text } from 'design'; diff --git a/web/packages/teleterm/src/ui/Tabs/Tabs.tsx b/web/packages/teleterm/src/ui/Tabs/Tabs.tsx index 85ac5d620958e..cea550fd612c5 100644 --- a/web/packages/teleterm/src/ui/Tabs/Tabs.tsx +++ b/web/packages/teleterm/src/ui/Tabs/Tabs.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { typography } from 'design/system'; import { Box } from 'design'; diff --git a/web/packages/teleterm/src/ui/TopBar/AdditionalActions.story.tsx b/web/packages/teleterm/src/ui/TopBar/AdditionalActions.story.tsx index 4c92ee21c0ae0..ecca747348d1f 100644 --- a/web/packages/teleterm/src/ui/TopBar/AdditionalActions.story.tsx +++ b/web/packages/teleterm/src/ui/TopBar/AdditionalActions.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import * as icons from 'design/Icon'; import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider'; diff --git a/web/packages/teleterm/src/ui/TopBar/Clusters/ClusterSelector/ClusterSelector.tsx b/web/packages/teleterm/src/ui/TopBar/Clusters/ClusterSelector/ClusterSelector.tsx index 38f6de93f26ad..962ac42a654a5 100644 --- a/web/packages/teleterm/src/ui/TopBar/Clusters/ClusterSelector/ClusterSelector.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Clusters/ClusterSelector/ClusterSelector.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { ChevronUp, ChevronDown } from 'design/Icon'; import styled from 'styled-components'; import { Text } from 'design'; diff --git a/web/packages/teleterm/src/ui/TopBar/Clusters/Clusters.tsx b/web/packages/teleterm/src/ui/TopBar/Clusters/Clusters.tsx index 232375aba1543..ec638d186a649 100644 --- a/web/packages/teleterm/src/ui/TopBar/Clusters/Clusters.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Clusters/Clusters.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback, useMemo, useRef, useState } from 'react'; +import { useCallback, useMemo, useRef, useState } from 'react'; import Popover from 'design/Popover'; import styled from 'styled-components'; import { Box } from 'design'; diff --git a/web/packages/teleterm/src/ui/TopBar/Clusters/ClustersFilterableList/ClustersFilterableList.tsx b/web/packages/teleterm/src/ui/TopBar/Clusters/ClustersFilterableList/ClustersFilterableList.tsx index c815eb5ec8956..ce1437e91f79f 100644 --- a/web/packages/teleterm/src/ui/TopBar/Clusters/ClustersFilterableList/ClustersFilterableList.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Clusters/ClustersFilterableList/ClustersFilterableList.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Box, Text } from 'design'; import { FilterableList } from 'teleterm/ui/components/FilterableList'; diff --git a/web/packages/teleterm/src/ui/TopBar/Connections/ConnectionsIcon/ConnectionsIcon.tsx b/web/packages/teleterm/src/ui/TopBar/Connections/ConnectionsIcon/ConnectionsIcon.tsx index e394e5028ba22..074a004a5eaca 100644 --- a/web/packages/teleterm/src/ui/TopBar/Connections/ConnectionsIcon/ConnectionsIcon.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Connections/ConnectionsIcon/ConnectionsIcon.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { Cluster } from 'design/Icon'; import styled from 'styled-components'; import { ButtonSecondary } from 'design'; diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/EmptyIdentityList/EmptyIdentityList.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/EmptyIdentityList/EmptyIdentityList.tsx index 98bf004a09518..1824054ebdfce 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/EmptyIdentityList/EmptyIdentityList.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/EmptyIdentityList/EmptyIdentityList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonPrimary, Flex, ResourceIcon, Text } from 'design'; interface EmptyIdentityListProps { diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx index 99c638f3b4071..e31c53415feac 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/Identity.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef, useEffect } from 'react'; +import { useRef, useEffect } from 'react'; import Flex from 'design/Flex'; import { TrustedDeviceRequirement } from 'gen-proto-ts/teleport/legacy/types/trusted_device_requirement_pb'; diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/Identity.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/Identity.tsx index fcddc3f2b72ce..9d124005ba6a9 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/Identity.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/Identity.tsx @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -import React, { +import { + forwardRef, useCallback, useMemo, useRef, @@ -91,7 +92,7 @@ export type IdentityProps = { makeTitle: (userWithClusterName: string | undefined) => string; }; -export const Identity = React.forwardRef( +export const Identity = forwardRef( ( { activeRootCluster, diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/IdentityList/AddNewClusterItem.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/IdentityList/AddNewClusterItem.tsx index 60ecc110a1481..bb0ebd52d3ac7 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/IdentityList/AddNewClusterItem.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/IdentityList/AddNewClusterItem.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Add } from 'design/Icon'; import styled from 'styled-components'; diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/IdentitySelector.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/IdentitySelector.tsx index c95c5aceb2c47..633ebdf293270 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/IdentitySelector.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/IdentitySelector.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { Box } from 'design'; import { getUserWithClusterName } from 'teleterm/ui/utils'; diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/PamIcon.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/PamIcon.tsx index ddd6d1ed69e2c..8d7a385bd7be6 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/PamIcon.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/PamIcon.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Image } from 'design'; diff --git a/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/UserIcon.tsx b/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/UserIcon.tsx index c1ba844f1b6a2..4807171195940 100644 --- a/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/UserIcon.tsx +++ b/web/packages/teleterm/src/ui/TopBar/Identity/IdentitySelector/UserIcon.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; interface UserIconProps { diff --git a/web/packages/teleterm/src/ui/components/CatchError/CatchError.jsx b/web/packages/teleterm/src/ui/components/CatchError/CatchError.jsx index 11d78f41a277e..8fe03c926fc21 100644 --- a/web/packages/teleterm/src/ui/components/CatchError/CatchError.jsx +++ b/web/packages/teleterm/src/ui/components/CatchError/CatchError.jsx @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -import React from 'react'; +import { Component } from 'react'; import { UnhandledCaseError } from 'shared/utils/assertUnreachable'; import { FailedApp } from 'teleterm/ui/components/App'; import Logger from 'teleterm/logger'; -export class CatchError extends React.Component { +export class CatchError extends Component { logger = new Logger('CatchError'); static getDerivedStateFromError(error) { diff --git a/web/packages/teleterm/src/ui/components/FieldInputs.tsx b/web/packages/teleterm/src/ui/components/FieldInputs.tsx index 10233ff889a2d..d4cc4f94b340d 100644 --- a/web/packages/teleterm/src/ui/components/FieldInputs.tsx +++ b/web/packages/teleterm/src/ui/components/FieldInputs.tsx @@ -18,7 +18,7 @@ import FieldInput from 'shared/components/FieldInput'; import styled from 'styled-components'; -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { FieldInputProps } from 'shared/components/FieldInput'; export const ConfigFieldInput = forwardRef( diff --git a/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.test.tsx b/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.test.tsx index 68dca2a049afb..64343efb60242 100644 --- a/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.test.tsx +++ b/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { screen, within } from '@testing-library/react'; import { fireEvent, render } from 'design/utils/testing'; diff --git a/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.tsx b/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.tsx index bcc32985c6a84..ded2158666a12 100644 --- a/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.tsx +++ b/web/packages/teleterm/src/ui/components/FilterableList/FilterableList.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { Fragment, ReactNode, useMemo, useState } from 'react'; +import { Fragment, ReactNode, useMemo, useState } from 'react'; import { Input } from 'design'; import styled from 'styled-components'; diff --git a/web/packages/teleterm/src/ui/components/KeyboardArrowsNavigation/KeyboardArrowsNavigation.test.tsx b/web/packages/teleterm/src/ui/components/KeyboardArrowsNavigation/KeyboardArrowsNavigation.test.tsx index dec2bbfe57ebe..ea70634fa74fd 100644 --- a/web/packages/teleterm/src/ui/components/KeyboardArrowsNavigation/KeyboardArrowsNavigation.test.tsx +++ b/web/packages/teleterm/src/ui/components/KeyboardArrowsNavigation/KeyboardArrowsNavigation.test.tsx @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -import React, { +import { + createRef, forwardRef, ReactNode, useCallback, @@ -152,7 +153,7 @@ test('activeIndex can be changed manually', () => { } ); - const ref = React.createRef(); + const ref = createRef(); const { container } = render( diff --git a/web/packages/teleterm/src/ui/components/Notifcations/Notifications.story.tsx b/web/packages/teleterm/src/ui/components/Notifcations/Notifications.story.tsx index 148dd5cea7b32..e76a93b6765a7 100644 --- a/web/packages/teleterm/src/ui/components/Notifcations/Notifications.story.tsx +++ b/web/packages/teleterm/src/ui/components/Notifcations/Notifications.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { ButtonPrimary, Flex } from 'design'; import { unique } from 'teleterm/ui/utils/uid'; diff --git a/web/packages/teleterm/src/ui/components/Notifcations/Notifications.tsx b/web/packages/teleterm/src/ui/components/Notifcations/Notifications.tsx index c98d80326ea5e..84bbecdfd752a 100644 --- a/web/packages/teleterm/src/ui/components/Notifcations/Notifications.tsx +++ b/web/packages/teleterm/src/ui/components/Notifcations/Notifications.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Notification } from 'shared/components/Notification'; diff --git a/web/packages/teleterm/src/ui/components/Notifcations/NotificationsHost.tsx b/web/packages/teleterm/src/ui/components/Notifcations/NotificationsHost.tsx index 19721e0c0412a..a3c8e3a54d56f 100644 --- a/web/packages/teleterm/src/ui/components/Notifcations/NotificationsHost.tsx +++ b/web/packages/teleterm/src/ui/components/Notifcations/NotificationsHost.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { useAppContext } from 'teleterm/ui/appContextProvider'; import { Notifications } from './Notifications'; diff --git a/web/packages/teleterm/src/ui/components/OfflineGateway.tsx b/web/packages/teleterm/src/ui/components/OfflineGateway.tsx index 0c33e307d974c..cd9c647043e1c 100644 --- a/web/packages/teleterm/src/ui/components/OfflineGateway.tsx +++ b/web/packages/teleterm/src/ui/components/OfflineGateway.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { ButtonPrimary, Flex, H2, Text } from 'design'; import * as Alerts from 'design/Alert'; diff --git a/web/packages/teleterm/src/ui/services/keyboardShortcuts/useKeyboardShortcuts.test.tsx b/web/packages/teleterm/src/ui/services/keyboardShortcuts/useKeyboardShortcuts.test.tsx index 847c80404a493..150fd3a50ca7b 100644 --- a/web/packages/teleterm/src/ui/services/keyboardShortcuts/useKeyboardShortcuts.test.tsx +++ b/web/packages/teleterm/src/ui/services/keyboardShortcuts/useKeyboardShortcuts.test.tsx @@ -18,8 +18,6 @@ import renderHook from 'design/utils/renderHook'; -import React from 'react'; - import AppContextProvider from 'teleterm/ui/appContextProvider'; import AppContext from 'teleterm/ui/appContext';