diff --git a/web/.storybook/preview.tsx b/web/.storybook/preview.tsx index 30b5aac4f353d..dcf775d5c3d49 100644 --- a/web/.storybook/preview.tsx +++ b/web/.storybook/preview.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { ComponentType, PropsWithChildren } from 'react'; +import { ComponentType, PropsWithChildren } from 'react'; import { bblpTheme, darkTheme, lightTheme } from '../packages/design/src/theme'; import { ConfiguredThemeProvider } from '../packages/design/src/ThemeProvider'; import Box from '../packages/design/src/Box'; diff --git a/web/packages/teleport/src/AccessRequests/AccessRequests.story.tsx b/web/packages/teleport/src/AccessRequests/AccessRequests.story.tsx index 30e8c2a52b5ac..f67b6bae97437 100644 --- a/web/packages/teleport/src/AccessRequests/AccessRequests.story.tsx +++ b/web/packages/teleport/src/AccessRequests/AccessRequests.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { LockedAccessRequests } from 'teleport/AccessRequests/LockedAccessRequests/LockedAccessRequests'; import { ContextProvider } from 'teleport'; import { createTeleportContext } from 'teleport/mocks/contexts'; diff --git a/web/packages/teleport/src/Account/Account.story.tsx b/web/packages/teleport/src/Account/Account.story.tsx index c1803ab8aeb6d..00cee6454d8f1 100644 --- a/web/packages/teleport/src/Account/Account.story.tsx +++ b/web/packages/teleport/src/Account/Account.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { PasswordState } from 'teleport/services/user'; diff --git a/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.story.tsx b/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.story.tsx index 7841bdf4ff680..c9909a70a85e9 100644 --- a/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.story.tsx +++ b/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import * as Icon from 'design/Icon'; import { ActionButtonSecondary, Header } from 'teleport/Account/Header'; diff --git a/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.test.tsx b/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.test.tsx index 10e4781b2071d..6811f9aad3137 100644 --- a/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.test.tsx +++ b/web/packages/teleport/src/Account/ManageDevices/AuthDeviceList/AuthDeviceList.test.tsx @@ -18,7 +18,6 @@ import { render, screen } from 'design/utils/testing'; import { within } from '@testing-library/react'; -import React from 'react'; import { MfaDevice } from 'teleport/services/mfa'; diff --git a/web/packages/teleport/src/Account/ManageDevices/wizards/DeleteAuthDeviceWizard.test.tsx b/web/packages/teleport/src/Account/ManageDevices/wizards/DeleteAuthDeviceWizard.test.tsx index 60b11e46cf805..8062e09294b1c 100644 --- a/web/packages/teleport/src/Account/ManageDevices/wizards/DeleteAuthDeviceWizard.test.tsx +++ b/web/packages/teleport/src/Account/ManageDevices/wizards/DeleteAuthDeviceWizard.test.tsx @@ -17,7 +17,6 @@ */ import { render, screen } from 'design/utils/testing'; -import React from 'react'; import { within } from '@testing-library/react'; import { userEvent, UserEvent } from '@testing-library/user-event'; diff --git a/web/packages/teleport/src/Account/PasswordBox.tsx b/web/packages/teleport/src/Account/PasswordBox.tsx index f4ce622668517..d8d99ea287075 100644 --- a/web/packages/teleport/src/Account/PasswordBox.tsx +++ b/web/packages/teleport/src/Account/PasswordBox.tsx @@ -18,7 +18,7 @@ import { Box, Flex } from 'design'; import { SingleRowBox } from 'design/MultiRowBox'; -import React, { useState } from 'react'; +import { useState } from 'react'; import * as Icon from 'design/Icon'; diff --git a/web/packages/teleport/src/Account/StatePill.tsx b/web/packages/teleport/src/Account/StatePill.tsx index 9476e6f6bd012..126d155779f82 100644 --- a/web/packages/teleport/src/Account/StatePill.tsx +++ b/web/packages/teleport/src/Account/StatePill.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled, { css } from 'styled-components'; /** State of an authentication method (password, MFA method, or passkey). */ diff --git a/web/packages/teleport/src/AppLauncher/AppLauncher.story.tsx b/web/packages/teleport/src/AppLauncher/AppLauncher.story.tsx index c6ec14fa91bf3..ef80fe3052f89 100644 --- a/web/packages/teleport/src/AppLauncher/AppLauncher.story.tsx +++ b/web/packages/teleport/src/AppLauncher/AppLauncher.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { AppLauncherAccessDenied, AppLauncherProcessing } from './AppLauncher'; export default { diff --git a/web/packages/teleport/src/AppLauncher/AppLauncher.test.tsx b/web/packages/teleport/src/AppLauncher/AppLauncher.test.tsx index 85aabbcd6e662..ae561d4950532 100644 --- a/web/packages/teleport/src/AppLauncher/AppLauncher.test.tsx +++ b/web/packages/teleport/src/AppLauncher/AppLauncher.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render, waitFor, screen } from 'design/utils/testing'; import { createMemoryHistory } from 'history'; import { Router } from 'react-router'; diff --git a/web/packages/teleport/src/AppLauncher/AppLauncher.tsx b/web/packages/teleport/src/AppLauncher/AppLauncher.tsx index 72281dc4df9ea..97d3559bb6365 100644 --- a/web/packages/teleport/src/AppLauncher/AppLauncher.tsx +++ b/web/packages/teleport/src/AppLauncher/AppLauncher.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback, useEffect } from 'react'; +import { useCallback, useEffect } from 'react'; import { useLocation, useParams } from 'react-router'; diff --git a/web/packages/teleport/src/Apps/AddApp/AddApp.story.tsx b/web/packages/teleport/src/Apps/AddApp/AddApp.story.tsx index 294ba7c3dd4e4..db9ba0c4007ba 100644 --- a/web/packages/teleport/src/Apps/AddApp/AddApp.story.tsx +++ b/web/packages/teleport/src/Apps/AddApp/AddApp.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { AddApp } from './AddApp'; export default { diff --git a/web/packages/teleport/src/Apps/AddApp/AddApp.tsx b/web/packages/teleport/src/Apps/AddApp/AddApp.tsx index 7567e8ae00c8f..7d158017aa93d 100644 --- a/web/packages/teleport/src/Apps/AddApp/AddApp.tsx +++ b/web/packages/teleport/src/Apps/AddApp/AddApp.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex } from 'design'; import Dialog, { DialogTitle } from 'design/Dialog'; diff --git a/web/packages/teleport/src/Apps/AddApp/Automatically.test.tsx b/web/packages/teleport/src/Apps/AddApp/Automatically.test.tsx index daa159c1f7f61..c694a488e33cb 100644 --- a/web/packages/teleport/src/Apps/AddApp/Automatically.test.tsx +++ b/web/packages/teleport/src/Apps/AddApp/Automatically.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { fireEvent, render, screen } from 'design/utils/testing'; import { act } from '@testing-library/react'; diff --git a/web/packages/teleport/src/Apps/AddApp/Automatically.tsx b/web/packages/teleport/src/Apps/AddApp/Automatically.tsx index 4d75f0e1f0274..6ebb40572a15b 100644 --- a/web/packages/teleport/src/Apps/AddApp/Automatically.tsx +++ b/web/packages/teleport/src/Apps/AddApp/Automatically.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { KeyboardEvent } from 'react'; +import { useState, useEffect, KeyboardEvent } from 'react'; import { Link, Text, @@ -38,11 +38,11 @@ import { State } from './useAddApp'; export function Automatically(props: Props) { const { onClose, attempt, token } = props; - const [name, setName] = React.useState(''); - const [uri, setUri] = React.useState(''); - const [cmd, setCmd] = React.useState(''); + const [name, setName] = useState(''); + const [uri, setUri] = useState(''); + const [cmd, setCmd] = useState(''); - React.useEffect(() => { + useEffect(() => { if (name && uri) { const cmd = createAppBashCommand(token.id, name, uri); setCmd(cmd); diff --git a/web/packages/teleport/src/Apps/AddApp/Manually.test.tsx b/web/packages/teleport/src/Apps/AddApp/Manually.test.tsx index c7d9ca011ee1c..f11fe24516958 100644 --- a/web/packages/teleport/src/Apps/AddApp/Manually.test.tsx +++ b/web/packages/teleport/src/Apps/AddApp/Manually.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 { Manually } from './Manually'; diff --git a/web/packages/teleport/src/Apps/AddApp/Manually.tsx b/web/packages/teleport/src/Apps/AddApp/Manually.tsx index da48610baf801..b36d5b0f382f2 100644 --- a/web/packages/teleport/src/Apps/AddApp/Manually.tsx +++ b/web/packages/teleport/src/Apps/AddApp/Manually.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Box, diff --git a/web/packages/teleport/src/Audit/Audit.story.tsx b/web/packages/teleport/src/Audit/Audit.story.tsx index ae10e090e78cd..c4bba0210fa2f 100644 --- a/web/packages/teleport/src/Audit/Audit.story.tsx +++ b/web/packages/teleport/src/Audit/Audit.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Router } from 'react-router'; import { createMemoryHistory } from 'history'; diff --git a/web/packages/teleport/src/Audit/Audit.tsx b/web/packages/teleport/src/Audit/Audit.tsx index b47d8b3ca83e6..5865e84d9c6c4 100644 --- a/web/packages/teleport/src/Audit/Audit.tsx +++ b/web/packages/teleport/src/Audit/Audit.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Danger } from 'design/Alert'; import { Indicator, Box } from 'design'; diff --git a/web/packages/teleport/src/Audit/EventDialog/EventDialog.tsx b/web/packages/teleport/src/Audit/EventDialog/EventDialog.tsx index 47a03145b400f..8fe8f8d3ee1b2 100644 --- a/web/packages/teleport/src/Audit/EventDialog/EventDialog.tsx +++ b/web/packages/teleport/src/Audit/EventDialog/EventDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import PropTypes from 'prop-types'; import TextEditor from 'shared/components/TextEditor'; import Dialog, { diff --git a/web/packages/teleport/src/Audit/EventList/EventList.tsx b/web/packages/teleport/src/Audit/EventList/EventList.tsx index f01abe10e96c4..edae1169f515e 100644 --- a/web/packages/teleport/src/Audit/EventList/EventList.tsx +++ b/web/packages/teleport/src/Audit/EventList/EventList.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { ButtonBorder, Flex } from 'design'; import Table, { Cell } from 'design/DataTable'; import { dateTimeMatcher } from 'design/utils/match'; diff --git a/web/packages/teleport/src/Audit/EventList/EventListCells.tsx b/web/packages/teleport/src/Audit/EventList/EventListCells.tsx index f65db0466511a..f142fc97b4e0a 100644 --- a/web/packages/teleport/src/Audit/EventList/EventListCells.tsx +++ b/web/packages/teleport/src/Audit/EventList/EventListCells.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Cell } from 'design/DataTable'; import { ButtonBorder } from 'design'; import { displayDateTime } from 'design/datetime'; diff --git a/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx b/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx index d3b0af0f8a9a5..a65be04e962d6 100644 --- a/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx +++ b/web/packages/teleport/src/Audit/EventList/EventTypeCell.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Cell } from 'design/DataTable'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/Audit/EventList/ViewInPolicyButton.tsx b/web/packages/teleport/src/Audit/EventList/ViewInPolicyButton.tsx index d1f4fc5522270..5cf4c0f68cf12 100644 --- a/web/packages/teleport/src/Audit/EventList/ViewInPolicyButton.tsx +++ b/web/packages/teleport/src/Audit/EventList/ViewInPolicyButton.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { ButtonBorder } from 'design'; import { NavLink } from 'react-router-dom'; diff --git a/web/packages/teleport/src/AuthConnectors/AuthConnectors.story.tsx b/web/packages/teleport/src/AuthConnectors/AuthConnectors.story.tsx index 29c1d5a277f0d..7ebde97af3555 100644 --- a/web/packages/teleport/src/AuthConnectors/AuthConnectors.story.tsx +++ b/web/packages/teleport/src/AuthConnectors/AuthConnectors.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { ContextProvider } from 'teleport'; import { createTeleportContext } from 'teleport/mocks/contexts'; diff --git a/web/packages/teleport/src/AuthConnectors/AuthConnectors.tsx b/web/packages/teleport/src/AuthConnectors/AuthConnectors.tsx index 806350f9a5245..fc16cfe7d20a3 100644 --- a/web/packages/teleport/src/AuthConnectors/AuthConnectors.tsx +++ b/web/packages/teleport/src/AuthConnectors/AuthConnectors.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Alert, Box, Flex, H3, Indicator, Link } from 'design'; import { P } from 'design/Text/Text'; diff --git a/web/packages/teleport/src/AuthConnectors/ConnectorList/ConnectorList.tsx b/web/packages/teleport/src/AuthConnectors/ConnectorList/ConnectorList.tsx index 2b810f924af14..39544ef9bda3b 100644 --- a/web/packages/teleport/src/AuthConnectors/ConnectorList/ConnectorList.tsx +++ b/web/packages/teleport/src/AuthConnectors/ConnectorList/ConnectorList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box, ButtonPrimary, Flex, ResourceIcon, Text } from 'design'; import { MenuIcon, MenuItem } from 'shared/components/MenuAction'; diff --git a/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.story.tsx b/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.story.tsx index 6ab964e728ba8..cf765f4f4019d 100644 --- a/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.story.tsx +++ b/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import DeleteDialog from './DeleteConnectorDialog'; export default { diff --git a/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.tsx b/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.tsx index 477d1e4a4fa00..a9f7e3eccc5d2 100644 --- a/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.tsx +++ b/web/packages/teleport/src/AuthConnectors/DeleteConnectorDialog/DeleteConnectorDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import useAttempt from 'shared/hooks/useAttemptNext'; import { ButtonWarning, ButtonSecondary, Text, Alert, P1 } from 'design'; import Dialog, { diff --git a/web/packages/teleport/src/AuthConnectors/EmptyList/EmptyList.tsx b/web/packages/teleport/src/AuthConnectors/EmptyList/EmptyList.tsx index fe3edc54a7ecc..b3dd5ea561647 100644 --- a/web/packages/teleport/src/AuthConnectors/EmptyList/EmptyList.tsx +++ b/web/packages/teleport/src/AuthConnectors/EmptyList/EmptyList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Card, Flex, H1, ResourceIcon, Text } from 'design'; import { AuthProviderType } from 'shared/services'; diff --git a/web/packages/teleport/src/AuthConnectors/ssoIcons/getSsoIcon.tsx b/web/packages/teleport/src/AuthConnectors/ssoIcons/getSsoIcon.tsx index 01101bff5ee94..27fae0e56fd9a 100644 --- a/web/packages/teleport/src/AuthConnectors/ssoIcons/getSsoIcon.tsx +++ b/web/packages/teleport/src/AuthConnectors/ssoIcons/getSsoIcon.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { AuthProviderType } from 'shared/services'; import { Box, Flex, ResourceIcon } from 'design'; diff --git a/web/packages/teleport/src/Bots/Add/AddBots.tsx b/web/packages/teleport/src/Bots/Add/AddBots.tsx index 081919a8264d3..e913db70bc06b 100644 --- a/web/packages/teleport/src/Bots/Add/AddBots.tsx +++ b/web/packages/teleport/src/Bots/Add/AddBots.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Switch, Route } from 'teleport/components/Router'; import cfg from 'teleport/config'; diff --git a/web/packages/teleport/src/Bots/Add/AddBotsPicker.story.tsx b/web/packages/teleport/src/Bots/Add/AddBotsPicker.story.tsx index 7551ba4035b9a..9ab7f6bc89628 100644 --- a/web/packages/teleport/src/Bots/Add/AddBotsPicker.story.tsx +++ b/web/packages/teleport/src/Bots/Add/AddBotsPicker.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Bots/Add/AddBotsPicker.tsx b/web/packages/teleport/src/Bots/Add/AddBotsPicker.tsx index ed1d6206d9fb9..695060aadb047 100644 --- a/web/packages/teleport/src/Bots/Add/AddBotsPicker.tsx +++ b/web/packages/teleport/src/Bots/Add/AddBotsPicker.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.story.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.story.tsx index 62dd7da280a30..ff1c07d106ed3 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.story.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.test.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.test.tsx index 92d4dbd75ee0f..26dfa55af1aea 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.test.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.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 { MemoryRouter } from 'react-router-dom'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.tsx index 39106dde9fffd..0b3a9f8c1d80f 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/AddBotToWorkflow.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Box from 'design/Box'; import { Text } from 'design'; import TextEditor from 'shared/components/TextEditor'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.story.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.story.tsx index 6c7f230ecfa80..c03d309ef2d9b 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.story.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.test.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.test.tsx index 8831e5f19c9d7..c43d22890043d 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.test.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { render, screen, userEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.tsx index 53d926b344a98..e7b3d248c9ac3 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/ConfigureBot.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import styled from 'styled-components'; import Box from 'design/Box'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.story.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.story.tsx index c5b246140934d..81859d2f77b44 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.story.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.test.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.test.tsx index 9c468ddc64677..23704e8709ad2 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.test.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { MemoryRouter } from 'react-router'; import { render, screen } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.tsx index 9a299ededd6e2..12cb3c60f0b94 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/ConnectGitHub.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import styled from 'styled-components'; import Box from 'design/Box'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.test.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.test.tsx index 27555e2bf29f4..f162a5ed2e7c6 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.test.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { render, screen } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.tsx index 893b3d660fa99..2ae26050215eb 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/Finish.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link } from 'react-router-dom'; import Flex from 'design/Flex'; diff --git a/web/packages/teleport/src/Bots/Add/GitHubActions/GitHubActions.test.tsx b/web/packages/teleport/src/Bots/Add/GitHubActions/GitHubActions.test.tsx index 653750175ebde..eb4e762ac2b9b 100644 --- a/web/packages/teleport/src/Bots/Add/GitHubActions/GitHubActions.test.tsx +++ b/web/packages/teleport/src/Bots/Add/GitHubActions/GitHubActions.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen, userEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.test.tsx b/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.test.tsx index f8bd3dcb67699..6443d8ba1a3bb 100644 --- a/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.test.tsx +++ b/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.test.tsx @@ -19,7 +19,6 @@ import { render, screen, userEvent } from 'design/utils/testing'; import { createMemoryHistory } from 'history'; import { Router, MemoryRouter } from 'react-router'; -import React from 'react'; import cfg from 'teleport/config'; diff --git a/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.tsx b/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.tsx index 03c93ee795d2f..a923ec4449013 100644 --- a/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.tsx +++ b/web/packages/teleport/src/Bots/Add/Shared/FlowButtons.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link, useLocation } from 'react-router-dom'; import { ButtonPrimary, ButtonSecondary } from 'design/Button'; diff --git a/web/packages/teleport/src/Bots/Add/Shared/GuidedFlow.tsx b/web/packages/teleport/src/Bots/Add/Shared/GuidedFlow.tsx index e6c4a7532e477..2e6265250adfc 100644 --- a/web/packages/teleport/src/Bots/Add/Shared/GuidedFlow.tsx +++ b/web/packages/teleport/src/Bots/Add/Shared/GuidedFlow.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import Flex from 'design/Flex'; import { Text, H1 } from 'design'; diff --git a/web/packages/teleport/src/Bots/DeleteBot.tsx b/web/packages/teleport/src/Bots/DeleteBot.tsx index a73771397305e..93b8dffa2fa0a 100644 --- a/web/packages/teleport/src/Bots/DeleteBot.tsx +++ b/web/packages/teleport/src/Bots/DeleteBot.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Alert, ButtonSecondary, ButtonWarning, P1, Text } from 'design'; import Dialog, { DialogContent, diff --git a/web/packages/teleport/src/Bots/EditBot.tsx b/web/packages/teleport/src/Bots/EditBot.tsx index 1aaac565795df..fdacbaa5d8053 100644 --- a/web/packages/teleport/src/Bots/EditBot.tsx +++ b/web/packages/teleport/src/Bots/EditBot.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Alert, ButtonSecondary, ButtonWarning } from 'design'; import Dialog, { DialogContent, diff --git a/web/packages/teleport/src/Bots/List/ActionCell.tsx b/web/packages/teleport/src/Bots/List/ActionCell.tsx index ec98394a9d0a6..7658d7bb0e641 100644 --- a/web/packages/teleport/src/Bots/List/ActionCell.tsx +++ b/web/packages/teleport/src/Bots/List/ActionCell.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Cell } from 'design/DataTable'; import { MenuButton, MenuItem } from 'shared/components/MenuAction'; diff --git a/web/packages/teleport/src/Bots/List/BotList.tsx b/web/packages/teleport/src/Bots/List/BotList.tsx index f0fe3f74ba29f..058035bd5b293 100644 --- a/web/packages/teleport/src/Bots/List/BotList.tsx +++ b/web/packages/teleport/src/Bots/List/BotList.tsx @@ -18,7 +18,7 @@ import Table, { LabelCell } from 'design/DataTable'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { BotOptionsCell } from 'teleport/Bots/List/ActionCell'; diff --git a/web/packages/teleport/src/Bots/List/Bots.story.tsx b/web/packages/teleport/src/Bots/List/Bots.story.tsx index 33022fb654e87..07e20b8ed537f 100644 --- a/web/packages/teleport/src/Bots/List/Bots.story.tsx +++ b/web/packages/teleport/src/Bots/List/Bots.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { botsFixture } from 'teleport/Bots/fixtures'; diff --git a/web/packages/teleport/src/Bots/List/Bots.test.tsx b/web/packages/teleport/src/Bots/List/Bots.test.tsx index 5d0f0a78afdeb..99c79ac70b29b 100644 --- a/web/packages/teleport/src/Bots/List/Bots.test.tsx +++ b/web/packages/teleport/src/Bots/List/Bots.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen, userEvent, waitFor } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Bots/List/Bots.tsx b/web/packages/teleport/src/Bots/List/Bots.tsx index ade2886712151..33cdc7959ca70 100644 --- a/web/packages/teleport/src/Bots/List/Bots.tsx +++ b/web/packages/teleport/src/Bots/List/Bots.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useAttemptNext } from 'shared/hooks'; import { Link } from 'react-router-dom'; import { HoverTooltip } from 'design/Tooltip'; diff --git a/web/packages/teleport/src/Bots/List/EmptyState/EmptyState.tsx b/web/packages/teleport/src/Bots/List/EmptyState/EmptyState.tsx index 990578de5c196..adb892805532f 100644 --- a/web/packages/teleport/src/Bots/List/EmptyState/EmptyState.tsx +++ b/web/packages/teleport/src/Bots/List/EmptyState/EmptyState.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, { useTheme } from 'styled-components'; import { Link } from 'react-router-dom'; import { ResourceIcon } from 'design/ResourceIcon'; diff --git a/web/packages/teleport/src/Bots/ViewBot.story.tsx b/web/packages/teleport/src/Bots/ViewBot.story.tsx index c6435c5d4f725..64a46fce051bd 100644 --- a/web/packages/teleport/src/Bots/ViewBot.story.tsx +++ b/web/packages/teleport/src/Bots/ViewBot.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { BotUiFlow } from 'teleport/services/bot/types'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Bots/ViewBot.tsx b/web/packages/teleport/src/Bots/ViewBot.tsx index 35844ffce77d7..abaece2a2167f 100644 --- a/web/packages/teleport/src/Bots/ViewBot.tsx +++ b/web/packages/teleport/src/Bots/ViewBot.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonSecondary, Flex, Text } from 'design'; import Dialog, { DialogContent, diff --git a/web/packages/teleport/src/Clusters/Clusters.story.tsx b/web/packages/teleport/src/Clusters/Clusters.story.tsx index 03fd1184c931f..c4eb703b9ab88 100644 --- a/web/packages/teleport/src/Clusters/Clusters.story.tsx +++ b/web/packages/teleport/src/Clusters/Clusters.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Router } from 'react-router'; import { createMemoryHistory } from 'history'; diff --git a/web/packages/teleport/src/Clusters/Clusters.tsx b/web/packages/teleport/src/Clusters/Clusters.tsx index 61c95d919f05a..6ded2d3f0591a 100644 --- a/web/packages/teleport/src/Clusters/Clusters.tsx +++ b/web/packages/teleport/src/Clusters/Clusters.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, Indicator } from 'design'; import { Danger } from 'design/Alert'; diff --git a/web/packages/teleport/src/Console/ActionBar/ActionBar.tsx b/web/packages/teleport/src/Console/ActionBar/ActionBar.tsx index 36658aaefae33..07e9e0060295a 100644 --- a/web/packages/teleport/src/Console/ActionBar/ActionBar.tsx +++ b/web/packages/teleport/src/Console/ActionBar/ActionBar.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { LatencyDiagnostic } from 'shared/components/LatencyDiagnostic'; import { Flex } from 'design'; diff --git a/web/packages/teleport/src/Console/Console.story.tsx b/web/packages/teleport/src/Console/Console.story.tsx index 448d5a282ef71..cc64a3a2d30bc 100644 --- a/web/packages/teleport/src/Console/Console.story.tsx +++ b/web/packages/teleport/src/Console/Console.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useState } from 'react'; import { Flex } from 'design'; import { createMemoryHistory } from 'history'; import { Router, Route } from 'react-router'; @@ -60,11 +60,11 @@ ConsoleStory.parameters = { }; export function TestLayout(props: PropType) { - const [context] = React.useState((): ConsoleContext => { + const [context] = useState((): ConsoleContext => { return props.ctx || new ConsoleContext(); }); - const [history] = React.useState((): any => { + const [history] = useState((): any => { const history = props.history || createMemoryHistory({ diff --git a/web/packages/teleport/src/Console/Console.tsx b/web/packages/teleport/src/Console/Console.tsx index e0bc17f879f4d..b2a74e4aa1a69 100644 --- a/web/packages/teleport/src/Console/Console.tsx +++ b/web/packages/teleport/src/Console/Console.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useEffect, useMemo } from 'react'; import styled from 'styled-components'; import { Box, Flex, Indicator } from 'design'; import { Danger } from 'design/Alert'; @@ -52,7 +52,7 @@ export default function Console() { const hasSshSessions = storeDocs.getSshDocuments().length > 0; const { attempt, run } = useAttempt(); - React.useEffect(() => { + useEffect(() => { run(() => consoleCtx.initStoreUser()); }, []); @@ -134,7 +134,7 @@ export default function Console() { */ function MemoizedDocument(props: { doc: stores.Document; visible: boolean }) { const { doc, visible } = props; - return React.useMemo(() => { + return useMemo(() => { switch (doc.kind) { case 'terminal': return ; diff --git a/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.story.tsx b/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.story.tsx index 7170e19589c3f..1f4b83395045a 100644 --- a/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.story.tsx +++ b/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import DocumentBlank from './DocumentBlank'; import { TestLayout } from './../Console.story'; diff --git a/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.tsx b/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.tsx index b9de37ff20ce4..6ba4b0d0c1180 100644 --- a/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.tsx +++ b/web/packages/teleport/src/Console/DocumentBlank/DocumentBlank.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex, ButtonPrimary } from 'design'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/Console/DocumentDb/ConnectDialog.tsx b/web/packages/teleport/src/Console/DocumentDb/ConnectDialog.tsx index 6d91f451fe0ae..7af8db35c9e3e 100644 --- a/web/packages/teleport/src/Console/DocumentDb/ConnectDialog.tsx +++ b/web/packages/teleport/src/Console/DocumentDb/ConnectDialog.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 Dialog, { DialogContent, DialogFooter, diff --git a/web/packages/teleport/src/Console/DocumentDb/DocumentDb.story.tsx b/web/packages/teleport/src/Console/DocumentDb/DocumentDb.story.tsx index 2be3ba4e4bb2f..70f1e94d9e7d9 100644 --- a/web/packages/teleport/src/Console/DocumentDb/DocumentDb.story.tsx +++ b/web/packages/teleport/src/Console/DocumentDb/DocumentDb.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { createTeleportContext } from 'teleport/mocks/contexts'; import ConsoleCtx from 'teleport/Console/consoleContext'; diff --git a/web/packages/teleport/src/Console/DocumentDb/DocumentDb.test.tsx b/web/packages/teleport/src/Console/DocumentDb/DocumentDb.test.tsx index 24973bd8e1bd8..aecc3424a499f 100644 --- a/web/packages/teleport/src/Console/DocumentDb/DocumentDb.test.tsx +++ b/web/packages/teleport/src/Console/DocumentDb/DocumentDb.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { screen } from '@testing-library/react'; import '@testing-library/jest-dom'; diff --git a/web/packages/teleport/src/Console/DocumentDb/DocumentDb.tsx b/web/packages/teleport/src/Console/DocumentDb/DocumentDb.tsx index 583fb3f5285fd..0d6d333141b2a 100644 --- a/web/packages/teleport/src/Console/DocumentDb/DocumentDb.tsx +++ b/web/packages/teleport/src/Console/DocumentDb/DocumentDb.tsx @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import React, { useRef, useEffect } from 'react'; +import { useRef, useEffect } from 'react'; import { useTheme } from 'styled-components'; import { Box, Indicator } from 'design'; diff --git a/web/packages/teleport/src/Console/DocumentDb/useDbSession.tsx b/web/packages/teleport/src/Console/DocumentDb/useDbSession.tsx index 908997b957448..5f5d01d099cfd 100644 --- a/web/packages/teleport/src/Console/DocumentDb/useDbSession.tsx +++ b/web/packages/teleport/src/Console/DocumentDb/useDbSession.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useRef, useState, useEffect } from 'react'; import { context, trace } from '@opentelemetry/api'; @@ -34,10 +34,10 @@ const tracer = trace.getTracer('TTY'); export function useDbSession(doc: DocumentDb) { const { clusterId, sid } = doc; const ctx = useConsoleContext(); - const ttyRef = React.useRef(null); + const ttyRef = useRef(null); const tty = ttyRef.current; - const [session, setSession] = React.useState(null); - const [status, setStatus] = React.useState('loading'); + const [session, setSession] = useState(null); + const [status, setStatus] = useState('loading'); function closeDocument() { ctx.closeTab(doc); @@ -51,7 +51,7 @@ export function useDbSession(doc: DocumentDb) { setStatus('initialized'); } - React.useEffect(() => { + useEffect(() => { const session: Session = { kind: 'db', clusterId, diff --git a/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.story.tsx b/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.story.tsx index 408bf819a5de0..72431021ab720 100644 --- a/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.story.tsx +++ b/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { createTeleportContext } from 'teleport/mocks/contexts'; import ConsoleCtx from 'teleport/Console/consoleContext'; diff --git a/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.test.tsx b/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.test.tsx index b85bb094d0571..a8c6620d449d8 100644 --- a/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.test.tsx +++ b/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.test.tsx @@ -15,7 +15,6 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import React from 'react'; import { screen } from '@testing-library/react'; import '@testing-library/jest-dom'; diff --git a/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.tsx b/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.tsx index 3b405e034f04c..30f3f45cae668 100644 --- a/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.tsx +++ b/web/packages/teleport/src/Console/DocumentKubeExec/DocumentKubeExec.tsx @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import React, { useRef, useEffect } from 'react'; +import { useRef, useEffect } from 'react'; import { useTheme } from 'styled-components'; import { Box, Indicator } from 'design'; diff --git a/web/packages/teleport/src/Console/DocumentKubeExec/KubeExecDataDialog.tsx b/web/packages/teleport/src/Console/DocumentKubeExec/KubeExecDataDialog.tsx index e8261cdf026c3..d71d12e1c5f09 100644 --- a/web/packages/teleport/src/Console/DocumentKubeExec/KubeExecDataDialog.tsx +++ b/web/packages/teleport/src/Console/DocumentKubeExec/KubeExecDataDialog.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import Dialog, { DialogContent, DialogFooter, diff --git a/web/packages/teleport/src/Console/DocumentKubeExec/useKubeExecSession.tsx b/web/packages/teleport/src/Console/DocumentKubeExec/useKubeExecSession.tsx index 387783b0ad4d5..912dd0be6ee9b 100644 --- a/web/packages/teleport/src/Console/DocumentKubeExec/useKubeExecSession.tsx +++ b/web/packages/teleport/src/Console/DocumentKubeExec/useKubeExecSession.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useRef, useState, useEffect } from 'react'; import { context, trace } from '@opentelemetry/api'; @@ -38,10 +38,10 @@ const tracer = trace.getTracer('TTY'); export default function useKubeExecSession(doc: DocumentKubeExec) { const { clusterId, sid, kubeCluster, mode } = doc; const ctx = useConsoleContext(); - const ttyRef = React.useRef(null); + const ttyRef = useRef(null); const tty = ttyRef.current as ReturnType; - const [session, setSession] = React.useState(null); - const [status, setStatus] = React.useState('loading'); + const [session, setSession] = useState(null); + const [status, setStatus] = useState('loading'); function closeDocument() { ctx.closeTab(doc); @@ -73,7 +73,7 @@ export default function useKubeExecSession(doc: DocumentKubeExec) { setStatus('initialized'); } - React.useEffect(() => { + useEffect(() => { function initTty(session, mode?: ParticipantMode) { tracer.startActiveSpan( 'initTTY', diff --git a/web/packages/teleport/src/Console/DocumentNodes/DocumentNodes.story.tsx b/web/packages/teleport/src/Console/DocumentNodes/DocumentNodes.story.tsx index 58dbb1ab37a9b..4bcc499c1f266 100644 --- a/web/packages/teleport/src/Console/DocumentNodes/DocumentNodes.story.tsx +++ b/web/packages/teleport/src/Console/DocumentNodes/DocumentNodes.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Node } from 'teleport/services/nodes/types'; import DocumentNodes from './DocumentNodes'; diff --git a/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.story.tsx b/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.story.tsx index 3e003cc7846e4..21cbe5048897f 100644 --- a/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.story.tsx +++ b/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { ContextProvider } from 'teleport'; import { createTeleportContext } from 'teleport/mocks/contexts'; diff --git a/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.tsx b/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.tsx index 01138ab3c70bf..c378216dd66fb 100644 --- a/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.tsx +++ b/web/packages/teleport/src/Console/DocumentSsh/DocumentSsh.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef, useEffect, useState, useCallback } from 'react'; +import { useRef, useEffect, useState, useCallback } from 'react'; import { useTheme } from 'styled-components'; import { Indicator, Box } from 'design'; diff --git a/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.story.tsx b/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.story.tsx index e025d2cdedfd7..2f8c81568ce17 100644 --- a/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.story.tsx +++ b/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Component from './ShareSession'; export default { diff --git a/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.tsx b/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.tsx index 4557a24597ff1..f2b0d48354fcb 100644 --- a/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.tsx +++ b/web/packages/teleport/src/Console/DocumentSsh/ShareSession/ShareSession.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, ButtonSecondary } from 'design'; import Dialog, { DialogHeader, diff --git a/web/packages/teleport/src/Console/DocumentSsh/useSshSession.ts b/web/packages/teleport/src/Console/DocumentSsh/useSshSession.ts index d9444d8f74bbf..26d8ae765a10f 100644 --- a/web/packages/teleport/src/Console/DocumentSsh/useSshSession.ts +++ b/web/packages/teleport/src/Console/DocumentSsh/useSshSession.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useRef, useState, useEffect } from 'react'; import { context, trace } from '@opentelemetry/api'; @@ -38,16 +38,16 @@ const tracer = trace.getTracer('TTY'); export default function useSshSession(doc: DocumentSsh) { const { clusterId, sid, serverId, login, mode } = doc; const ctx = useConsoleContext(); - const ttyRef = React.useRef(null); + const ttyRef = useRef(null); const tty = ttyRef.current as ReturnType; - const [session, setSession] = React.useState(null); - const [status, setStatus] = React.useState('loading'); + const [session, setSession] = useState(null); + const [status, setStatus] = useState('loading'); function closeDocument() { ctx.closeTab(doc); } - React.useEffect(() => { + useEffect(() => { function initTty(session, mode?: ParticipantMode) { tracer.startActiveSpan( 'initTTY', diff --git a/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.jsx b/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.jsx index ca58f932b8bce..955df3c1cb6a9 100644 --- a/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.jsx +++ b/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.jsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useRef, useState, useMemo } from 'react'; import styled from 'styled-components'; import Popover from 'design/Popover'; import { Box } from 'design'; @@ -24,10 +24,10 @@ import { debounce } from 'shared/utils/highbar'; export default function JoinedUsers(props) { const { active, users, open = false, ml, mr } = props; - const ref = React.useRef(null); - const [isOpen, setIsOpen] = React.useState(open); + const ref = useRef(null); + const [isOpen, setIsOpen] = useState(open); - const handleOpen = React.useMemo(() => { + const handleOpen = useMemo(() => { return debounce(() => setIsOpen(true), 300); }, []); diff --git a/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.story.jsx b/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.story.jsx index 0d956da85b641..b7dafb0890a24 100644 --- a/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.story.jsx +++ b/web/packages/teleport/src/Console/Tabs/JoinedUsers/JoinedUsers.story.jsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Component from './JoinedUsers'; export default { diff --git a/web/packages/teleport/src/Console/Tabs/TabItem.tsx b/web/packages/teleport/src/Console/Tabs/TabItem.tsx index 3c212f7ce7ee7..35f53d78692ad 100644 --- a/web/packages/teleport/src/Console/Tabs/TabItem.tsx +++ b/web/packages/teleport/src/Console/Tabs/TabItem.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Cross as CloseIcon } from 'design/Icon'; import { space } from 'design/system'; diff --git a/web/packages/teleport/src/Console/Tabs/Tabs.story.tsx b/web/packages/teleport/src/Console/Tabs/Tabs.story.tsx index e203a07b78e71..09ebdd1fa6c1d 100644 --- a/web/packages/teleport/src/Console/Tabs/Tabs.story.tsx +++ b/web/packages/teleport/src/Console/Tabs/Tabs.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Tabs from './Tabs'; import { TestLayout } from './../Console.story'; diff --git a/web/packages/teleport/src/Console/Tabs/Tabs.tsx b/web/packages/teleport/src/Console/Tabs/Tabs.tsx index 485cf9dd43b5d..607a8e3ed725c 100644 --- a/web/packages/teleport/src/Console/Tabs/Tabs.tsx +++ b/web/packages/teleport/src/Console/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'; diff --git a/web/packages/teleport/src/Console/index.tsx b/web/packages/teleport/src/Console/index.tsx index 96c7546ac8cb8..9ee678465f83b 100644 --- a/web/packages/teleport/src/Console/index.tsx +++ b/web/packages/teleport/src/Console/index.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useState } from 'react'; import Console from './Console'; import ConsoleContext from './consoleContext'; @@ -25,7 +25,7 @@ import ConsoleContextProvider from './consoleContextProvider'; // Main entry point to Console where it initializes ContextProvider with the // instance of ConsoleContext. export function ConsoleWithContext() { - const [ctx] = React.useState(() => { + const [ctx] = useState(() => { return new ConsoleContext(); }); diff --git a/web/packages/teleport/src/Console/useKeyboardNav.ts b/web/packages/teleport/src/Console/useKeyboardNav.ts index e035cd4272956..e9732812949f4 100644 --- a/web/packages/teleport/src/Console/useKeyboardNav.ts +++ b/web/packages/teleport/src/Console/useKeyboardNav.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useEffect } from 'react'; import { getPlatformType } from 'design/platform'; @@ -56,7 +56,7 @@ export function getMappedAction(event) { * @param ctx data that is shared between Console related components */ const useKeyboardNav = (ctx: ConsoleContext) => { - React.useEffect(() => { + useEffect(() => { const handleKeydown = event => { const { tabSwitch } = getMappedAction(event); if (!tabSwitch) { diff --git a/web/packages/teleport/src/Console/useOnExitConfirmation.ts b/web/packages/teleport/src/Console/useOnExitConfirmation.ts index 05f93edda22d0..5a03e07f72238 100644 --- a/web/packages/teleport/src/Console/useOnExitConfirmation.ts +++ b/web/packages/teleport/src/Console/useOnExitConfirmation.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useEffect } from 'react'; import session from 'teleport/services/websession'; @@ -35,7 +35,7 @@ const TAB_MIN_AGE = 30000; * @param ctx data that is shared between Console related components. */ function useOnExitConfirmation(ctx: ConsoleContext) { - React.useEffect(() => { + useEffect(() => { /** * handleBeforeUnload listens for browser closes and refreshes. * Checks if users need to be notified before closing based on type diff --git a/web/packages/teleport/src/Console/usePageTitle.tsx b/web/packages/teleport/src/Console/usePageTitle.tsx index c275ac27903ad..28d0c93b5f874 100644 --- a/web/packages/teleport/src/Console/usePageTitle.tsx +++ b/web/packages/teleport/src/Console/usePageTitle.tsx @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useEffect } from 'react'; import * as stores from './stores/types'; export default function usePageTitle(doc: stores.Document) { const title = doc && doc.title ? `${doc.title} • ${doc.clusterId}` : 'Console'; - React.useEffect(() => { + useEffect(() => { document.title = title; }, [title]); } diff --git a/web/packages/teleport/src/Console/useTabRouting.test.tsx b/web/packages/teleport/src/Console/useTabRouting.test.tsx index 86a667f989622..9422964afd834 100644 --- a/web/packages/teleport/src/Console/useTabRouting.test.tsx +++ b/web/packages/teleport/src/Console/useTabRouting.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { createMemoryHistory } from 'history'; import { Router } from 'react-router'; import renderHook from 'design/utils/renderHook'; diff --git a/web/packages/teleport/src/Console/useTabRouting.ts b/web/packages/teleport/src/Console/useTabRouting.ts index 650369d196d08..ce4306fa82fb6 100644 --- a/web/packages/teleport/src/Console/useTabRouting.ts +++ b/web/packages/teleport/src/Console/useTabRouting.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useMemo } from 'react'; import { useRouteMatch, useParams, useLocation } from 'react-router'; import cfg, { @@ -44,7 +44,7 @@ export default function useRouting(ctx: ConsoleContext) { ); // Ensure that each URL has corresponding document - React.useMemo(() => { + useMemo(() => { if (ctx.getActiveDocId(pathname) !== -1) { return; } diff --git a/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.story.tsx b/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.story.tsx index 347254af33922..bc8de5dcc2592 100644 --- a/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.story.tsx +++ b/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import ConnectDialog from './ConnectDialog'; export default { diff --git a/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.test.tsx b/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.test.tsx index 2660ea7c825b6..c8b65765362cd 100644 --- a/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.test.tsx +++ b/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.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 ConnectDialog, { Props } from './ConnectDialog'; diff --git a/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.tsx b/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.tsx index d499383e67081..bfd4c81daff47 100644 --- a/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.tsx +++ b/web/packages/teleport/src/Databases/ConnectDialog/ConnectDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Box, ButtonSecondary, Link, ButtonPrimary } from 'design'; import Dialog, { DialogHeader, diff --git a/web/packages/teleport/src/DesktopSession/ActionMenu.tsx b/web/packages/teleport/src/DesktopSession/ActionMenu.tsx index aea014ba522b7..552b1d4824815 100644 --- a/web/packages/teleport/src/DesktopSession/ActionMenu.tsx +++ b/web/packages/teleport/src/DesktopSession/ActionMenu.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MenuIcon, MenuItem, MenuItemIcon } from 'shared/components/MenuAction'; import * as Icons from 'design/Icon'; import { Flex } from 'design'; diff --git a/web/packages/teleport/src/DesktopSession/AlertDropdown.tsx b/web/packages/teleport/src/DesktopSession/AlertDropdown.tsx index 41ad9d1a135aa..c35bb2a02fab7 100644 --- a/web/packages/teleport/src/DesktopSession/AlertDropdown.tsx +++ b/web/packages/teleport/src/DesktopSession/AlertDropdown.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef, useState } from 'react'; +import { useRef, useState } from 'react'; import { Flex, Button, Card, ButtonIcon, H3 } from 'design'; import styled, { useTheme } from 'styled-components'; import { Notification } from 'shared/components/Notification'; diff --git a/web/packages/teleport/src/DesktopSession/DesktopSession.story.tsx b/web/packages/teleport/src/DesktopSession/DesktopSession.story.tsx index 5bbee6e3e410c..97606b1ea3b86 100644 --- a/web/packages/teleport/src/DesktopSession/DesktopSession.story.tsx +++ b/web/packages/teleport/src/DesktopSession/DesktopSession.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { ButtonPrimary } from 'design/Button'; import { NotificationItem } from 'shared/components/Notification'; import { throttle } from 'shared/utils/highbar'; diff --git a/web/packages/teleport/src/DesktopSession/DesktopSession.tsx b/web/packages/teleport/src/DesktopSession/DesktopSession.tsx index b1f188f2997c9..f5105f7d0246e 100644 --- a/web/packages/teleport/src/DesktopSession/DesktopSession.tsx +++ b/web/packages/teleport/src/DesktopSession/DesktopSession.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Indicator, Box, Flex, ButtonSecondary, ButtonPrimary } from 'design'; import { Info } from 'design/Alert'; import Dialog, { diff --git a/web/packages/teleport/src/DesktopSession/TopBar.tsx b/web/packages/teleport/src/DesktopSession/TopBar.tsx index dcd5beaec4881..9e69440f024fe 100644 --- a/web/packages/teleport/src/DesktopSession/TopBar.tsx +++ b/web/packages/teleport/src/DesktopSession/TopBar.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { useTheme } from 'styled-components'; import { Text, TopNav, Flex } from 'design'; import { Clipboard, FolderShared } from 'design/Icon'; diff --git a/web/packages/teleport/src/DeviceTrust/DeviceTrustLocked.tsx b/web/packages/teleport/src/DeviceTrust/DeviceTrustLocked.tsx index 1a12b9a6a772e..6d9dc859579cf 100644 --- a/web/packages/teleport/src/DeviceTrust/DeviceTrustLocked.tsx +++ b/web/packages/teleport/src/DeviceTrust/DeviceTrustLocked.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Box, Flex, Link } from 'design'; diff --git a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/AppCreatedDialog.tsx b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/AppCreatedDialog.tsx index ff53f39b67a1b..ec60acb2dc1e6 100644 --- a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/AppCreatedDialog.tsx +++ b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/AppCreatedDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Flex, ButtonPrimary } from 'design'; import * as Icons from 'design/Icon'; import Dialog, { DialogContent } from 'design/DialogConfirmation'; diff --git a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.story.tsx b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.story.tsx index c5563bcd3c9be..bc2a2b1245874 100644 --- a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.story.tsx +++ b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { delay, http, HttpResponse } from 'msw'; import { Info } from 'design/Alert'; diff --git a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.test.tsx b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.test.tsx index 6da7f30ac2359..ab58947ca3980 100644 --- a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.test.tsx +++ b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen, userEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.tsx b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.tsx index 2c357df859a58..3f266ee9b32a5 100644 --- a/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.tsx +++ b/web/packages/teleport/src/Discover/AwsMangementConsole/CreateAppAccess/CreateAppAccess.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Box, Flex, Link, Mark, H3 } from 'design'; import TextEditor from 'shared/components/TextEditor'; diff --git a/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.story.tsx b/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.story.tsx index 3502bb6f37d93..165778e4b5e6d 100644 --- a/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.story.tsx +++ b/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.tsx b/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.tsx index 32eb32e351979..e14ebefba6608 100644 --- a/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.tsx +++ b/web/packages/teleport/src/Discover/AwsMangementConsole/TestConnection/TestConnection.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Link, Mark, H3 } from 'design'; import Select from 'shared/components/Select'; import { OutlineInfo } from 'design/Alert/Alert'; diff --git a/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.story.tsx b/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.story.tsx index 8bf13e44b9110..b81246f9b195a 100644 --- a/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.story.tsx +++ b/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse } from 'msw'; import { withoutQuery } from 'web/packages/build/storybook'; diff --git a/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.tsx b/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.tsx index 6de079f10795b..4dfefd4a38240 100644 --- a/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.tsx +++ b/web/packages/teleport/src/Discover/ConnectMyComputer/SetupConnect/SetupConnect.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useCallback, useState, useRef } from 'react'; +import { useEffect, useCallback, useState, useRef } from 'react'; import { Link } from 'react-router-dom'; import { ButtonSecondary } from 'design/Button'; diff --git a/web/packages/teleport/src/Discover/ConnectMyComputer/TestConnection/TestConnection.story.tsx b/web/packages/teleport/src/Discover/ConnectMyComputer/TestConnection/TestConnection.story.tsx index e9c00b8ebb84a..0f6c5098c4e1d 100644 --- a/web/packages/teleport/src/Discover/ConnectMyComputer/TestConnection/TestConnection.story.tsx +++ b/web/packages/teleport/src/Discover/ConnectMyComputer/TestConnection/TestConnection.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse, delay } from 'msw'; diff --git a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.story.tsx b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.story.tsx index e9bc69d291f02..7276f47992078 100644 --- a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.story.tsx +++ b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { DatabaseEngine, DatabaseLocation } from '../../SelectResource'; diff --git a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.tsx b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.tsx index 867c3a7d3a2c1..ac1dad4f82457 100644 --- a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.tsx +++ b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabase.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Text, Box, Flex, Mark } from 'design'; import Validation, { Validator } from 'shared/components/Validation'; diff --git a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.story.tsx b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.story.tsx index 92698e3b1871c..ec1a9036c8ed6 100644 --- a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.story.tsx +++ b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Info } from 'design/Alert'; import { diff --git a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.tsx b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.tsx index c5de2390ff7e2..923f2028be6c6 100644 --- a/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.tsx +++ b/web/packages/teleport/src/Discover/Database/CreateDatabase/CreateDatabaseDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Flex, diff --git a/web/packages/teleport/src/Discover/Database/CreateDatabase/useCreateDatabase.test.tsx b/web/packages/teleport/src/Discover/Database/CreateDatabase/useCreateDatabase.test.tsx index 48c00a6a1b231..fb4ea2c3c3ddc 100644 --- a/web/packages/teleport/src/Discover/Database/CreateDatabase/useCreateDatabase.test.tsx +++ b/web/packages/teleport/src/Discover/Database/CreateDatabase/useCreateDatabase.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { renderHook, act, waitFor } from '@testing-library/react'; diff --git a/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.story.tsx b/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.story.tsx index d77105ab149b5..f448c137e5bad 100644 --- a/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.story.tsx +++ b/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { delay, http, HttpResponse } from 'msw'; import cfg from 'teleport/config'; diff --git a/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.test.tsx b/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.test.tsx index 97fc6d979408b..b1ca3d88a2ae5 100644 --- a/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.test.tsx +++ b/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { act, fireEvent, render, screen } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.tsx b/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.tsx index 79ad036a1592f..51801fca10dbe 100644 --- a/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.tsx +++ b/web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.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, { useTheme } from 'styled-components'; import { Box, diff --git a/web/packages/teleport/src/Discover/Database/DeployService/DeployService.tsx b/web/packages/teleport/src/Discover/Database/DeployService/DeployService.tsx index 1025c6fa6c3ac..605c9c2ddacf8 100644 --- a/web/packages/teleport/src/Discover/Database/DeployService/DeployService.tsx +++ b/web/packages/teleport/src/Discover/Database/DeployService/DeployService.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { ServiceDeployMethod } from '../common'; diff --git a/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.story.tsx b/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.story.tsx index a619f0bb15c44..44b9bd75c0265 100644 --- a/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.story.tsx +++ b/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse } from 'msw'; diff --git a/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.tsx b/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.tsx index 558cf03a979d3..cf056ad6ef285 100644 --- a/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.tsx +++ b/web/packages/teleport/src/Discover/Database/DeployService/ManualDeploy/ManualDeploy.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { Suspense, useState, useEffect } from 'react'; +import { Suspense, useState, useEffect } from 'react'; import { Box, ButtonSecondary, Text, Mark, H3 } from 'design'; import * as Icons from 'design/Icon'; import Validation, { Validator } from 'shared/components/Validation'; diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoDiscoverToggle.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoDiscoverToggle.tsx index 617d10ba79790..a5a12c24c6d21 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoDiscoverToggle.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoDiscoverToggle.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box, Toggle } from 'design'; import { IconTooltip } from 'design/Tooltip'; diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoEnrollment.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoEnrollment.tsx index 2a48bdccbd40c..f2254c79b178e 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoEnrollment.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/AutoEnrollment.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Text } from 'design'; import { FetchStatus } from 'design/DataTable/types'; import useAttempt, { Attempt } from 'shared/hooks/useAttemptNext'; diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.story.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.story.tsx index 28fe55953452c..e6ae451c5f28f 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.story.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse, delay } from 'msw'; import { Info } from 'design/Alert'; diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.test.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.test.tsx index f9a219a2749c7..76fcc62a7d7a4 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.test.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render, screen, fireEvent, act } from 'design/utils/testing'; import { diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx index ab7a884d83bbc..6e51e7d229b38 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/EnrollRdsDatabase.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Indicator } from 'design'; import { Danger } from 'design/Alert'; import useAttempt from 'shared/hooks/useAttemptNext'; diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/RdsDatabaseList.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/RdsDatabaseList.tsx index c5ca31114afea..d85c3058a167b 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/RdsDatabaseList.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/RdsDatabaseList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Table from 'design/DataTable'; import { FetchStatus } from 'design/DataTable/types'; diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/SingleEnrollment.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/SingleEnrollment.tsx index 1d7203366f94a..f68f62aaf0ba8 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/SingleEnrollment.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/SingleEnrollment.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Text } from 'design'; import { FetchStatus } from 'design/DataTable/types'; import { Attempt } from 'shared/hooks/useAttemptNext'; diff --git a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/VpcSelector.tsx b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/VpcSelector.tsx index 792624858e17b..64c9bf122f36a 100644 --- a/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/VpcSelector.tsx +++ b/web/packages/teleport/src/Discover/Database/EnrollRdsDatabase/VpcSelector.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { components } from 'react-select'; import { Box, Flex, LabelInput, Link, ButtonIcon } from 'design'; import Select from 'shared/components/Select'; diff --git a/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.story.tsx b/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.story.tsx index 2ee7837ef6298..da71cef5194d5 100644 --- a/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.story.tsx +++ b/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { IamPolicyView } from './IamPolicy'; diff --git a/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.tsx b/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.tsx index 8e70612fe8acc..0b1ef727d7450 100644 --- a/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.tsx +++ b/web/packages/teleport/src/Discover/Database/IamPolicy/IamPolicy.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Box, Flex, Indicator, Link, H3 } from 'design'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.story.tsx b/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.story.tsx index 1cbe2763e41fc..886758bcc796e 100644 --- a/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.story.tsx +++ b/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { DatabaseEngine } from '../../SelectResource'; diff --git a/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.tsx b/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.tsx index 4ca63ae5b52bb..cab72e1d173a9 100644 --- a/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.tsx +++ b/web/packages/teleport/src/Discover/Database/MutualTls/MutualTls.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Text, Box, Flex, Link, Mark } from 'design'; import { Danger } from 'design/Alert'; import { Info } from 'design/Icon'; diff --git a/web/packages/teleport/src/Discover/Database/SetupAccess/SetupAccess.story.tsx b/web/packages/teleport/src/Discover/Database/SetupAccess/SetupAccess.story.tsx index ce254e3c97c9b..a07af8627d0d2 100644 --- a/web/packages/teleport/src/Discover/Database/SetupAccess/SetupAccess.story.tsx +++ b/web/packages/teleport/src/Discover/Database/SetupAccess/SetupAccess.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { http, HttpResponse } from 'msw'; import { noAccess, getAcl } from 'teleport/mocks/contexts'; diff --git a/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.test.tsx b/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.test.tsx index 833fd882a8eab..ce19f13ae978d 100644 --- a/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.test.tsx +++ b/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render, screen, userEvent } from 'design/utils/testing'; import { userEventService } from 'teleport/services/userEvent'; diff --git a/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.tsx b/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.tsx index 5faaf84b6080a..d57a15037a21f 100644 --- a/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.tsx +++ b/web/packages/teleport/src/Discover/Database/TestConnection/TestConnection.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, LabelInput, H3, Subtitle3 } from 'design'; import Select, { Option } from 'shared/components/Select'; diff --git a/web/packages/teleport/src/Discover/Database/common.tsx b/web/packages/teleport/src/Discover/Database/common.tsx index bc8d9a779ff89..ddb2de8a8d9d3 100644 --- a/web/packages/teleport/src/Discover/Database/common.tsx +++ b/web/packages/teleport/src/Discover/Database/common.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box, Label as Pill, Mark } from 'design'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/Discover/Discover.test.tsx b/web/packages/teleport/src/Discover/Discover.test.tsx index f290c4f88defb..ee054f898d814 100644 --- a/web/packages/teleport/src/Discover/Discover.test.tsx +++ b/web/packages/teleport/src/Discover/Discover.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { MemoryRouter } from 'react-router'; import { render, screen } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/AgentWaitingDialog.tsx b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/AgentWaitingDialog.tsx index b36c2a345f618..395daa58a88cd 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/AgentWaitingDialog.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/AgentWaitingDialog.tsx @@ -24,7 +24,7 @@ import { Flex, Mark, } from 'design'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/Dialogs.story.tsx b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/Dialogs.story.tsx index 2f622bab7347d..7981549f89ca7 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/Dialogs.story.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/Dialogs.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse, delay } from 'msw'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EksClustersList.tsx b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EksClustersList.tsx index 711efb508c861..9dc312aa79b7b 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EksClustersList.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EksClustersList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Table from 'design/DataTable'; import { FetchStatus } from 'design/DataTable/types'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEKSCluster.test.tsx b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEKSCluster.test.tsx index 2b92c007131d8..23956e03be415 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEKSCluster.test.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEKSCluster.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render, screen, fireEvent, act } from 'design/utils/testing'; import { diff --git a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.story.tsx b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.story.tsx index 06dd72cf882ad..275a7e2ebcd8a 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.story.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.story.tsx @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { MemoryRouter } from 'react-router'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.tsx b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.tsx index 2505da7275658..1452adba62f8f 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollEksCluster.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useCallback } from 'react'; +import { useState, useCallback } from 'react'; import { Box, ButtonPrimary, diff --git a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollmentDialog.tsx b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollmentDialog.tsx index 3d7aa5a92570c..6636d1dbd7894 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollmentDialog.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/EnrollEKSCluster/EnrollmentDialog.tsx @@ -15,7 +15,6 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import React from 'react'; import { AnimatedProgressBar, ButtonPrimary, diff --git a/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.story.tsx b/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.story.tsx index 112b66f5d8fb4..d74f66a600a65 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.story.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { StoryObj } from '@storybook/react'; import { withoutQuery } from 'web/packages/build/storybook'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.tsx b/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.tsx index 6d383690f48c1..cb0b21ec28119 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/HelmChart/HelmChart.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { Suspense, useState } from 'react'; +import { Suspense, useState } from 'react'; import styled from 'styled-components'; import { Box, ButtonSecondary, Link, Text, Mark, H3, Subtitle3 } from 'design'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/SetupAccess/SetupAccess.story.tsx b/web/packages/teleport/src/Discover/Kubernetes/SetupAccess/SetupAccess.story.tsx index f88fc7b688c45..bcf2eee9cb211 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/SetupAccess/SetupAccess.story.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/SetupAccess/SetupAccess.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { initSelectedOptionsHelper } from 'teleport/Discover/Shared/SetupAccess'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.story.tsx b/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.story.tsx index 7dbf24c89ae40..31c589d16487b 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.story.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { TestConnection } from './TestConnection'; diff --git a/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.tsx b/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.tsx index 6933383168cd6..1c0807560a700 100644 --- a/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.tsx +++ b/web/packages/teleport/src/Discover/Kubernetes/TestConnection/TestConnection.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, H3, Subtitle3 } from 'design'; import Validation, { Validator } from 'shared/components/Validation'; import FieldInput from 'shared/components/FieldInput'; diff --git a/web/packages/teleport/src/Discover/SelectResource/PermissionsErrorMessage.tsx b/web/packages/teleport/src/Discover/SelectResource/PermissionsErrorMessage.tsx index bcc97de3a4cce..6be722224c60d 100644 --- a/web/packages/teleport/src/Discover/SelectResource/PermissionsErrorMessage.tsx +++ b/web/packages/teleport/src/Discover/SelectResource/PermissionsErrorMessage.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Box } from 'design'; import { ResourceKind } from '../Shared'; diff --git a/web/packages/teleport/src/Discover/SelectResource/SelectResource.tsx b/web/packages/teleport/src/Discover/SelectResource/SelectResource.tsx index cd6dbfda043cd..e9c197f68b717 100644 --- a/web/packages/teleport/src/Discover/SelectResource/SelectResource.tsx +++ b/web/packages/teleport/src/Discover/SelectResource/SelectResource.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useHistory, useLocation } from 'react-router'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/Discover/SelectResource/icons.tsx b/web/packages/teleport/src/Discover/SelectResource/icons.tsx index 14950ec9e2594..2b73cadc9180b 100644 --- a/web/packages/teleport/src/Discover/SelectResource/icons.tsx +++ b/web/packages/teleport/src/Discover/SelectResource/icons.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { ResourceIcon, ResourceIconName } from 'design/ResourceIcon'; interface DiscoverIconProps { diff --git a/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2Ice.story.tsx b/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2Ice.story.tsx index c2de10a6c4635..ebfad6984e91a 100644 --- a/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2Ice.story.tsx +++ b/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2Ice.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse, delay } from 'msw'; diff --git a/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2IceDialog.tsx b/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2IceDialog.tsx index d325d99b3b123..c26bcfcecf9b2 100644 --- a/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2IceDialog.tsx +++ b/web/packages/teleport/src/Discover/Server/CreateEc2Ice/CreateEc2IceDialog.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Text, Flex, diff --git a/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigCreatedDialog.tsx b/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigCreatedDialog.tsx index 4146162067ad5..b0e689741ce82 100644 --- a/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigCreatedDialog.tsx +++ b/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigCreatedDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Flex, ButtonPrimary, Box } from 'design'; import * as Icons from 'design/Icon'; import Dialog, { DialogContent } from 'design/DialogConfirmation'; diff --git a/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigSsm.story.tsx b/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigSsm.story.tsx index a00ca9776bd03..94559e8a5f0bd 100644 --- a/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigSsm.story.tsx +++ b/web/packages/teleport/src/Discover/Server/DiscoveryConfigSsm/DiscoveryConfigSsm.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse, delay } from 'msw'; import { Info } from 'design/Alert'; diff --git a/web/packages/teleport/src/Discover/Server/DownloadScript/DownloadScript.story.tsx b/web/packages/teleport/src/Discover/Server/DownloadScript/DownloadScript.story.tsx index 18bfa4f5992f8..fb51bc9fdd5b2 100644 --- a/web/packages/teleport/src/Discover/Server/DownloadScript/DownloadScript.story.tsx +++ b/web/packages/teleport/src/Discover/Server/DownloadScript/DownloadScript.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { StoryObj } from '@storybook/react'; import { withoutQuery } from 'web/packages/build/storybook'; diff --git a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/Ec2InstanceList.tsx b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/Ec2InstanceList.tsx index 6e5550c875d8f..72fceb18fda89 100644 --- a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/Ec2InstanceList.tsx +++ b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/Ec2InstanceList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text } from 'design'; import Table from 'design/DataTable'; import { FetchStatus } from 'design/DataTable/types'; diff --git a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.story.tsx b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.story.tsx index f9d4a8d57ed75..502fbef35f315 100644 --- a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.story.tsx +++ b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse, delay } from 'msw'; diff --git a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.test.tsx b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.test.tsx index ef24148144715..20585021a9e4f 100644 --- a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.test.tsx +++ b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, diff --git a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.tsx b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.tsx index 490e6479cd586..a3b4e1721557b 100644 --- a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.tsx +++ b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/EnrollEc2Instance.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Link as ExternalLink, Text, Toggle } from 'design'; import { Link as InternalLink } from 'react-router-dom'; import { FetchStatus } from 'design/DataTable/types'; diff --git a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/NoEc2IceRequiredDialog.tsx b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/NoEc2IceRequiredDialog.tsx index cc032085b09fa..3eb700be5af43 100644 --- a/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/NoEc2IceRequiredDialog.tsx +++ b/web/packages/teleport/src/Discover/Server/EnrollEc2Instance/NoEc2IceRequiredDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Flex, ButtonPrimary, Mark } from 'design'; import * as Icons from 'design/Icon'; import Dialog, { DialogContent } from 'design/DialogConfirmation'; diff --git a/web/packages/teleport/src/Discover/Server/SetupAccess/SetupAccess.story.tsx b/web/packages/teleport/src/Discover/Server/SetupAccess/SetupAccess.story.tsx index 8715a2aacfed9..3691348a0367b 100644 --- a/web/packages/teleport/src/Discover/Server/SetupAccess/SetupAccess.story.tsx +++ b/web/packages/teleport/src/Discover/Server/SetupAccess/SetupAccess.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { initSelectedOptionsHelper } from 'teleport/Discover/Shared/SetupAccess'; diff --git a/web/packages/teleport/src/Discover/Server/Shared.tsx b/web/packages/teleport/src/Discover/Server/Shared.tsx index 1c0131296a217..261fcd868e7b7 100644 --- a/web/packages/teleport/src/Discover/Server/Shared.tsx +++ b/web/packages/teleport/src/Discover/Server/Shared.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link as InternalLink } from 'react-router-dom'; import { OutlineInfo } from 'design/Alert/Alert'; import { Mark } from 'design'; diff --git a/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.story.tsx b/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.story.tsx index 2a79a3530e7f4..c6ca810395709 100644 --- a/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.story.tsx +++ b/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.tsx b/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.tsx index 54195cb3e6cc1..f72d45081e132 100644 --- a/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.tsx +++ b/web/packages/teleport/src/Discover/Server/TestConnection/TestConnection.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { ButtonSecondary, Box, LabelInput, H3, Subtitle3 } from 'design'; import Select from 'shared/components/Select'; diff --git a/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.story.tsx b/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.story.tsx index 1a48184e64f64..87077f94a0d89 100644 --- a/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { ConfigureIamPerms } from './ConfigureIamPerms'; export default { diff --git a/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.tsx b/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.tsx index 0c244462b7507..88fea8f220452 100644 --- a/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.tsx +++ b/web/packages/teleport/src/Discover/Shared/Aws/ConfigureIamPerms.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Flex, Link, Box, H3 } from 'design'; import { assertUnreachable } from 'shared/utils/assertUnreachable'; diff --git a/web/packages/teleport/src/Discover/Shared/Aws/Labels.tsx b/web/packages/teleport/src/Discover/Shared/Aws/Labels.tsx index e8b7759b4bd9f..5dc06e2e834b2 100644 --- a/web/packages/teleport/src/Discover/Shared/Aws/Labels.tsx +++ b/web/packages/teleport/src/Discover/Shared/Aws/Labels.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Flex, Label as Pill } from 'design'; import { Label } from 'teleport/types'; diff --git a/web/packages/teleport/src/Discover/Shared/Aws/RadioCell.tsx b/web/packages/teleport/src/Discover/Shared/Aws/RadioCell.tsx index cea4ea58ed132..dc70d1980e9b1 100644 --- a/web/packages/teleport/src/Discover/Shared/Aws/RadioCell.tsx +++ b/web/packages/teleport/src/Discover/Shared/Aws/RadioCell.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Flex } from 'design'; import { DisableableCell } from './DisableableCell'; diff --git a/web/packages/teleport/src/Discover/Shared/Aws/StatusCell.tsx b/web/packages/teleport/src/Discover/Shared/Aws/StatusCell.tsx index 403217d2cd00a..871004af440ae 100644 --- a/web/packages/teleport/src/Discover/Shared/Aws/StatusCell.tsx +++ b/web/packages/teleport/src/Discover/Shared/Aws/StatusCell.tsx @@ -17,7 +17,6 @@ */ import { Flex } from 'design'; -import React from 'react'; import { DisableableCell as Cell } from 'teleport/Discover/Shared'; diff --git a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.story.tsx b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.story.tsx index abdf491e7e910..81889fa0702e8 100644 --- a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse, delay } from 'msw'; diff --git a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.test.tsx b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.test.tsx index cbf77b8dca781..9747b7fa4c36e 100644 --- a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.test.tsx +++ b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen, fireEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx index d651596820a1e..3b4400d30cf7f 100644 --- a/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx +++ b/web/packages/teleport/src/Discover/Shared/AwsAccount/AwsAccount.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState, useCallback } from 'react'; +import { useEffect, useState, useCallback } from 'react'; import { Link } from 'react-router-dom'; import { Box, diff --git a/web/packages/teleport/src/Discover/Shared/AwsRegionSelector/AwsRegionSelector.story.tsx b/web/packages/teleport/src/Discover/Shared/AwsRegionSelector/AwsRegionSelector.story.tsx index 6c5dbdee81510..e16ccb7fa56b5 100644 --- a/web/packages/teleport/src/Discover/Shared/AwsRegionSelector/AwsRegionSelector.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/AwsRegionSelector/AwsRegionSelector.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text } from 'design'; import { AwsRegionSelector } from './AwsRegionSelector'; diff --git a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.story.tsx b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.story.tsx index 740f1ac0d2a1b..2302d45f13bac 100644 --- a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { http, HttpResponse } from 'msw'; import { MemoryRouter } from 'react-router'; import { Info } from 'design/Alert'; diff --git a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.tsx b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.tsx index 35b2046c26a96..3e5df17ec7920 100644 --- a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.tsx +++ b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryService.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Link as InternalLink } from 'react-router-dom'; import { Box, Text, Mark } from 'design'; import { OutlineInfo } from 'design/Alert/Alert'; diff --git a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryServiceDirections.tsx b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryServiceDirections.tsx index 1b56b2d69e270..ab1f96fb42247 100644 --- a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryServiceDirections.tsx +++ b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/ConfigureDiscoveryServiceDirections.tsx @@ -20,8 +20,6 @@ import styled from 'styled-components'; import { IconTooltip } from 'design/Tooltip'; -import React from 'react'; - import { P } from 'design/Text/Text'; import { TextSelectCopyMulti } from 'teleport/components/TextSelectCopy'; diff --git a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.story.tsx b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.story.tsx index 73af471af56dd..135ba3be30aeb 100644 --- a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { CreatedDiscoveryConfigDialog } from './CreatedDiscoveryConfigDialog'; export default { diff --git a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.tsx b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.tsx index ee7bf1db8e2d0..01721d58154ee 100644 --- a/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.tsx +++ b/web/packages/teleport/src/Discover/Shared/ConfigureDiscoveryService/CreatedDiscoveryConfigDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Flex, diff --git a/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.story.tsx b/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.story.tsx index 5a2e8563b3191..ec40b556949c7 100644 --- a/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { ConnectionDiagnosticResult } from './ConnectionDiagnosticResult'; import type { Props } from './ConnectionDiagnosticResult'; diff --git a/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.tsx b/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.tsx index 7471948b2eea6..37609dc1b1f4c 100644 --- a/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.tsx +++ b/web/packages/teleport/src/Discover/Shared/ConnectionDiagnostic/ConnectionDiagnosticResult.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import styled from 'styled-components'; import { ButtonSecondary, diff --git a/web/packages/teleport/src/Discover/Shared/CustomInputFieldForAsterisks.tsx b/web/packages/teleport/src/Discover/Shared/CustomInputFieldForAsterisks.tsx index 89fe0ff42c982..fdee3e124000d 100644 --- a/web/packages/teleport/src/Discover/Shared/CustomInputFieldForAsterisks.tsx +++ b/web/packages/teleport/src/Discover/Shared/CustomInputFieldForAsterisks.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 { Option } from 'shared/components/Select'; diff --git a/web/packages/teleport/src/Discover/Shared/Finished/Finished.story.tsx b/web/packages/teleport/src/Discover/Shared/Finished/Finished.story.tsx index 0c0229cf1b4a7..92dc22bf66471 100644 --- a/web/packages/teleport/src/Discover/Shared/Finished/Finished.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/Finished/Finished.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Finished as Component } from './Finished'; import type { AgentStepProps } from '../../types'; diff --git a/web/packages/teleport/src/Discover/Shared/Finished/Finished.tsx b/web/packages/teleport/src/Discover/Shared/Finished/Finished.tsx index 22e9c3c72e586..753a8d72878da 100644 --- a/web/packages/teleport/src/Discover/Shared/Finished/Finished.tsx +++ b/web/packages/teleport/src/Discover/Shared/Finished/Finished.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { ButtonPrimary, Text, Flex, ButtonSecondary, Image, H2 } from 'design'; diff --git a/web/packages/teleport/src/Discover/Shared/LabelsCreater/LabelsCreater.story.tsx b/web/packages/teleport/src/Discover/Shared/LabelsCreater/LabelsCreater.story.tsx index 9b2d921fdd579..7af57131265d2 100644 --- a/web/packages/teleport/src/Discover/Shared/LabelsCreater/LabelsCreater.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/LabelsCreater/LabelsCreater.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import Validation from 'shared/components/Validation'; diff --git a/web/packages/teleport/src/Discover/Shared/SecurityGroupPicker/SecurityGroupRulesDialog.tsx b/web/packages/teleport/src/Discover/Shared/SecurityGroupPicker/SecurityGroupRulesDialog.tsx index 7c28f61ba9f09..9fd199c01f392 100644 --- a/web/packages/teleport/src/Discover/Shared/SecurityGroupPicker/SecurityGroupRulesDialog.tsx +++ b/web/packages/teleport/src/Discover/Shared/SecurityGroupPicker/SecurityGroupRulesDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { ButtonSecondary, H2, Text } from 'design'; diff --git a/web/packages/teleport/src/Discover/Shared/SelectCreatable/SelectCreatable.story.tsx b/web/packages/teleport/src/Discover/Shared/SelectCreatable/SelectCreatable.story.tsx index 93fecf592ef81..0d30ab47217ff 100644 --- a/web/packages/teleport/src/Discover/Shared/SelectCreatable/SelectCreatable.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/SelectCreatable/SelectCreatable.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { SelectCreatable as Component, Option } from './SelectCreatable'; diff --git a/web/packages/teleport/src/Discover/Shared/SetupAccess/SetupAccessWrapper.story.tsx b/web/packages/teleport/src/Discover/Shared/SetupAccess/SetupAccessWrapper.story.tsx index 9a8649cce9281..e44581205ae81 100644 --- a/web/packages/teleport/src/Discover/Shared/SetupAccess/SetupAccessWrapper.story.tsx +++ b/web/packages/teleport/src/Discover/Shared/SetupAccess/SetupAccessWrapper.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { SetupAccessWrapper } from './SetupAccessWrapper'; diff --git a/web/packages/teleport/src/Discover/Shared/SetupAccess/useUserTraits.test.tsx b/web/packages/teleport/src/Discover/Shared/SetupAccess/useUserTraits.test.tsx index 0fad042b4bb26..d8e9d48e2c9ff 100644 --- a/web/packages/teleport/src/Discover/Shared/SetupAccess/useUserTraits.test.tsx +++ b/web/packages/teleport/src/Discover/Shared/SetupAccess/useUserTraits.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { renderHook, act, waitFor } from '@testing-library/react'; import { AwsRole } from 'shared/services/apps'; diff --git a/web/packages/teleport/src/Discover/Shared/Step.tsx b/web/packages/teleport/src/Discover/Shared/Step.tsx index 0269b3f310c56..3b96de100fd8e 100644 --- a/web/packages/teleport/src/Discover/Shared/Step.tsx +++ b/web/packages/teleport/src/Discover/Shared/Step.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Text } from 'design'; diff --git a/web/packages/teleport/src/Discover/Shared/Timeout.tsx b/web/packages/teleport/src/Discover/Shared/Timeout.tsx index e0708b9b8e856..e32ef09f53044 100644 --- a/web/packages/teleport/src/Discover/Shared/Timeout.tsx +++ b/web/packages/teleport/src/Discover/Shared/Timeout.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; interface TimeoutProps { timeout: number; // ms diff --git a/web/packages/teleport/src/Discover/useDiscover.test.tsx b/web/packages/teleport/src/Discover/useDiscover.test.tsx index 5a933dcdfcfea..f293cd0acc20c 100644 --- a/web/packages/teleport/src/Discover/useDiscover.test.tsx +++ b/web/packages/teleport/src/Discover/useDiscover.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { renderHook, act } from '@testing-library/react'; diff --git a/web/packages/teleport/src/HeadlessRequest/Cards.story.tsx b/web/packages/teleport/src/HeadlessRequest/Cards.story.tsx index cb2f94f7155ce..0f309e7cac080 100644 --- a/web/packages/teleport/src/HeadlessRequest/Cards.story.tsx +++ b/web/packages/teleport/src/HeadlessRequest/Cards.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { CardAccept, CardDenied } from './Cards'; export default { diff --git a/web/packages/teleport/src/HeadlessRequest/Cards.tsx b/web/packages/teleport/src/HeadlessRequest/Cards.tsx index 9eaf01c132e87..bfc96a6955d48 100644 --- a/web/packages/teleport/src/HeadlessRequest/Cards.tsx +++ b/web/packages/teleport/src/HeadlessRequest/Cards.tsx @@ -18,7 +18,6 @@ import { Card, CardSuccess, H1 } from 'design'; import { CircleStop } from 'design/Icon'; -import React from 'react'; export function CardDenied({ title, children }) { return ( diff --git a/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.test.tsx b/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.test.tsx index 774d096be5a1a..4f5f36a1090e6 100644 --- a/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.test.tsx +++ b/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.test.tsx @@ -17,7 +17,6 @@ */ import { render, screen } from 'design/utils/testing'; -import React from 'react'; import { Route, Router } from 'react-router'; import { createMemoryHistory } from 'history'; diff --git a/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.tsx b/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.tsx index c0adeae9b5ad4..804f2201be20f 100644 --- a/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.tsx +++ b/web/packages/teleport/src/HeadlessRequest/HeadlessRequest.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import styled from 'styled-components'; import { Spinner } from 'design/Icon'; diff --git a/web/packages/teleport/src/Integrations/EditAwsOidcIntegrationDialog.tsx b/web/packages/teleport/src/Integrations/EditAwsOidcIntegrationDialog.tsx index 97e024bac16d2..9107dff46a441 100644 --- a/web/packages/teleport/src/Integrations/EditAwsOidcIntegrationDialog.tsx +++ b/web/packages/teleport/src/Integrations/EditAwsOidcIntegrationDialog.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import styled from 'styled-components'; import { ButtonSecondary, diff --git a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/AwsOidc.story.tsx b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/AwsOidc.story.tsx index 37019315276b0..c531a0cde264f 100644 --- a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/AwsOidc.story.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/AwsOidc.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { AwsOidc } from './AwsOidc'; diff --git a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/ConfigureAwsOidcSummary.tsx b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/ConfigureAwsOidcSummary.tsx index b99521e8719ae..dfc16254c7263 100644 --- a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/ConfigureAwsOidcSummary.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/ConfigureAwsOidcSummary.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Flex, Box, H3, Text } from 'design'; import TextEditor from 'shared/components/TextEditor'; diff --git a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/FinishDialog.story.tsx b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/FinishDialog.story.tsx index d7bf45b355b2c..c05455117aadd 100644 --- a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/FinishDialog.story.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/FinishDialog.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { diff --git a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/S3BucketConfiguration.tsx b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/S3BucketConfiguration.tsx index 47452f3aa720e..6acdda272d825 100644 --- a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/S3BucketConfiguration.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/S3BucketConfiguration.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Flex } from 'design'; import FieldInput from 'shared/components/FieldInput'; import { IconTooltip } from 'design/Tooltip'; diff --git a/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.story.tsx b/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.story.tsx index 5964e459ff8e4..9f0574aed75df 100644 --- a/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.story.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.tsx b/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.tsx index b8b37ac37636d..1b34155c612ef 100644 --- a/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/IntegrationEnroll.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex } from 'design'; import { diff --git a/web/packages/teleport/src/Integrations/Enroll/IntegrationRoute.tsx b/web/packages/teleport/src/Integrations/Enroll/IntegrationRoute.tsx index 347e226794abe..5f9b427036e2e 100644 --- a/web/packages/teleport/src/Integrations/Enroll/IntegrationRoute.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/IntegrationRoute.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import cfg from 'teleport/config'; import { Route } from 'teleport/components/Router'; import { IntegrationKind } from 'teleport/services/integrations'; diff --git a/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.test.tsx b/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.test.tsx index 566768325d086..6ebbde667d1bf 100644 --- a/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.test.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen, userEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.tsx b/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.tsx index bc800611fc581..fcbabd55cca47 100644 --- a/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/IntegrationTiles.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link } from 'react-router-dom'; import { Text, Flex } from 'design'; diff --git a/web/packages/teleport/src/Integrations/Enroll/MachineIDIntegrationSection.tsx b/web/packages/teleport/src/Integrations/Enroll/MachineIDIntegrationSection.tsx index 21bbc4aa80ad3..4492a3415e23a 100644 --- a/web/packages/teleport/src/Integrations/Enroll/MachineIDIntegrationSection.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/MachineIDIntegrationSection.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Box, H2 } from 'design'; import { P } from 'design/Text/Text'; diff --git a/web/packages/teleport/src/Integrations/Enroll/common.tsx b/web/packages/teleport/src/Integrations/Enroll/common.tsx index ed61e93631fde..d387add42656e 100644 --- a/web/packages/teleport/src/Integrations/Enroll/common.tsx +++ b/web/packages/teleport/src/Integrations/Enroll/common.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box, Flex, H2, ResourceIcon } from 'design'; import styled from 'styled-components'; import { P } from 'design/Text/Text'; diff --git a/web/packages/teleport/src/Integrations/IntegrationStatus.tsx b/web/packages/teleport/src/Integrations/IntegrationStatus.tsx index 836fe97cfcec7..f065d313ca721 100644 --- a/web/packages/teleport/src/Integrations/IntegrationStatus.tsx +++ b/web/packages/teleport/src/Integrations/IntegrationStatus.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { useParams } from 'react-router'; import { IntegrationKind, PluginKind } from 'teleport/services/integrations'; diff --git a/web/packages/teleport/src/Integrations/Integrations.story.tsx b/web/packages/teleport/src/Integrations/Integrations.story.tsx index 4778031667ccb..1f38b92b2bfe8 100644 --- a/web/packages/teleport/src/Integrations/Integrations.story.tsx +++ b/web/packages/teleport/src/Integrations/Integrations.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { diff --git a/web/packages/teleport/src/Integrations/Integrations.tsx b/web/packages/teleport/src/Integrations/Integrations.tsx index 619bb791a0acc..e1b71adde1713 100644 --- a/web/packages/teleport/src/Integrations/Integrations.tsx +++ b/web/packages/teleport/src/Integrations/Integrations.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import useAttempt from 'shared/hooks/useAttemptNext'; import { Indicator, Box, Alert } from 'design'; diff --git a/web/packages/teleport/src/Integrations/IntegrationsAddButton.tsx b/web/packages/teleport/src/Integrations/IntegrationsAddButton.tsx index fe82b29c38dad..7c00e1b7b5c5b 100644 --- a/web/packages/teleport/src/Integrations/IntegrationsAddButton.tsx +++ b/web/packages/teleport/src/Integrations/IntegrationsAddButton.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link } from 'react-router-dom'; import { Button } from 'design'; import { HoverTooltip } from 'design/Tooltip'; diff --git a/web/packages/teleport/src/Integrations/Operations/IntegrationOperations.tsx b/web/packages/teleport/src/Integrations/Operations/IntegrationOperations.tsx index 9960ff2d3358d..0468586857206 100644 --- a/web/packages/teleport/src/Integrations/Operations/IntegrationOperations.tsx +++ b/web/packages/teleport/src/Integrations/Operations/IntegrationOperations.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Integration } from 'teleport/services/integrations'; import { DeleteIntegrationDialog } from '../RemoveIntegrationDialog'; diff --git a/web/packages/teleport/src/Integrations/RemoveIntegrationDialog.tsx b/web/packages/teleport/src/Integrations/RemoveIntegrationDialog.tsx index 6d19cfdfc7def..f2cc5d6ed051c 100644 --- a/web/packages/teleport/src/Integrations/RemoveIntegrationDialog.tsx +++ b/web/packages/teleport/src/Integrations/RemoveIntegrationDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonSecondary, ButtonWarning, Text, Alert, P1 } from 'design'; import Dialog, { DialogHeader, diff --git a/web/packages/teleport/src/JoinTokens/JoinTokenForms.tsx b/web/packages/teleport/src/JoinTokens/JoinTokenForms.tsx index f00394756448b..ba1eba785f487 100644 --- a/web/packages/teleport/src/JoinTokens/JoinTokenForms.tsx +++ b/web/packages/teleport/src/JoinTokens/JoinTokenForms.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex, Text, ButtonIcon, ButtonText } from 'design'; import { Plus, Trash } from 'design/Icon'; import { requiredField } from 'shared/components/Validation/rules'; diff --git a/web/packages/teleport/src/JoinTokens/JoinTokens.story.tsx b/web/packages/teleport/src/JoinTokens/JoinTokens.story.tsx index 5e80cb99b80e3..a3132cb89a0a8 100644 --- a/web/packages/teleport/src/JoinTokens/JoinTokens.story.tsx +++ b/web/packages/teleport/src/JoinTokens/JoinTokens.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { http, HttpResponse } from 'msw'; diff --git a/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.story.tsx b/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.story.tsx index 529a97c73f8a9..77a7cd15eda76 100644 --- a/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.story.tsx +++ b/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Component from './ConnectDialog'; export default { diff --git a/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.tsx b/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.tsx index c296724bc20c7..9cfd088343692 100644 --- a/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.tsx +++ b/web/packages/teleport/src/Kubes/ConnectDialog/ConnectDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Dialog, { DialogFooter, DialogHeader, diff --git a/web/packages/teleport/src/LocksV2/Locks/DeleteLockDialogue.tsx b/web/packages/teleport/src/LocksV2/Locks/DeleteLockDialogue.tsx index 0eab89aea9fa7..0b8c1990e19ac 100644 --- a/web/packages/teleport/src/LocksV2/Locks/DeleteLockDialogue.tsx +++ b/web/packages/teleport/src/LocksV2/Locks/DeleteLockDialogue.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonSecondary, ButtonWarning, P1 } from 'design'; import { Danger } from 'design/Alert'; import useAttempt from 'shared/hooks/useAttemptNext'; diff --git a/web/packages/teleport/src/LocksV2/Locks/Locks.test.tsx b/web/packages/teleport/src/LocksV2/Locks/Locks.test.tsx index 514bfe6aee0a8..89af1b730ba6c 100644 --- a/web/packages/teleport/src/LocksV2/Locks/Locks.test.tsx +++ b/web/packages/teleport/src/LocksV2/Locks/Locks.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, fireEvent, screen } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/LocksV2/Locks/Locks.tsx b/web/packages/teleport/src/LocksV2/Locks/Locks.tsx index 9af3c443d9e8d..3e62f2015e021 100644 --- a/web/packages/teleport/src/LocksV2/Locks/Locks.tsx +++ b/web/packages/teleport/src/LocksV2/Locks/Locks.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { Fragment, useState, useEffect } from 'react'; import { useLocation, useHistory } from 'react-router'; import { formatRelative } from 'date-fns'; import { Danger } from 'design/Alert'; @@ -207,10 +207,10 @@ export function Pills({ targets }: { targets: LockTarget[] }) { const pills = targets.map((target, index) => { const labelText = `${target.kind}: ${target.name}`; return ( - + {index > 0 && ' '} {labelText} - + ); }); diff --git a/web/packages/teleport/src/LocksV2/NewLock/NewLock.tsx b/web/packages/teleport/src/LocksV2/NewLock/NewLock.tsx index db6ad9db4eddd..02de78ad45d12 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/NewLock.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/NewLock.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef, useState } from 'react'; +import { useRef, useState } from 'react'; import { Prompt } from 'react-router'; import { Link } from 'react-router-dom'; import { Transition } from 'react-transition-group'; diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Desktops.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Desktops.tsx index 198f8b80dbaee..14df805248c62 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Desktops.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Desktops.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ClickableLabelCell } from 'design/DataTable'; import { Desktop } from 'teleport/services/desktops'; diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Nodes.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Nodes.tsx index 0bc5d8e32296d..a56826ac296b3 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Nodes.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Nodes.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Cell, ClickableLabelCell } from 'design/DataTable'; import { Node } from 'teleport/services/nodes'; diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Roles.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Roles.tsx index a709af747dabe..60126cceca7bb 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Roles.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/Roles.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Table from 'design/DataTable'; import { RoleResource } from 'teleport/services/resources'; diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx index e7e6848b18e4d..f59a9d624bb5e 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/ServerSideSupportedList/ServerSideSupportedList.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect, useMemo } from 'react'; +import { useState, useEffect, useMemo } from 'react'; import { SortType } from 'design/DataTable/types'; import { Flex } from 'design'; import { StyledPanel } from 'design/DataTable/StyledTable'; diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/MfaDevices.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/MfaDevices.tsx index e767912564a6d..fb6740b3fa006 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/MfaDevices.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/MfaDevices.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text } from 'design'; import Table, { Cell } from 'design/DataTable'; import { dateMatcher } from 'design/utils/match'; diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/Users.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/Users.tsx index 4d46aa3d27adf..54f663bb96763 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/Users.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/SimpleList/Users.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Table, { Cell, LabelCell } from 'design/DataTable'; import { User } from 'teleport/services/user'; diff --git a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/common.tsx b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/common.tsx index 817958341ca84..8d01be29c95f2 100644 --- a/web/packages/teleport/src/LocksV2/NewLock/ResourceList/common.tsx +++ b/web/packages/teleport/src/LocksV2/NewLock/ResourceList/common.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Box, ButtonPrimary, ButtonBorder } from 'design'; import Table, { Cell } from 'design/DataTable'; diff --git a/web/packages/teleport/src/Login/CardTerminal/CardTerminal.story.tsx b/web/packages/teleport/src/Login/CardTerminal/CardTerminal.story.tsx index 99af328eac6a2..3054ebb8b0ebe 100644 --- a/web/packages/teleport/src/Login/CardTerminal/CardTerminal.story.tsx +++ b/web/packages/teleport/src/Login/CardTerminal/CardTerminal.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { MemoryRouter } from 'react-router'; import cfg from 'teleport/config'; diff --git a/web/packages/teleport/src/Login/Login.story.tsx b/web/packages/teleport/src/Login/Login.story.tsx index f4aa2084db862..45ae413e8bfd0 100644 --- a/web/packages/teleport/src/Login/Login.story.tsx +++ b/web/packages/teleport/src/Login/Login.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { MemoryRouter } from 'react-router'; diff --git a/web/packages/teleport/src/Login/Login.test.tsx b/web/packages/teleport/src/Login/Login.test.tsx index 964b4ba04b32f..f993acf319533 100644 --- a/web/packages/teleport/src/Login/Login.test.tsx +++ b/web/packages/teleport/src/Login/Login.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { userEvent, UserEvent } from '@testing-library/user-event'; import selectEvent from 'react-select-event'; import { render, fireEvent, screen, waitFor } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Login/Login.tsx b/web/packages/teleport/src/Login/Login.tsx index f524c72bcdfb3..173e707bbba05 100644 --- a/web/packages/teleport/src/Login/Login.tsx +++ b/web/packages/teleport/src/Login/Login.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import styled from 'styled-components'; import { Box, Text, Link, Flex, ButtonPrimary, H1 } from 'design'; diff --git a/web/packages/teleport/src/Login/LoginClose.tsx b/web/packages/teleport/src/Login/LoginClose.tsx index 4680a6507b9cf..0272b220cce02 100644 --- a/web/packages/teleport/src/Login/LoginClose.tsx +++ b/web/packages/teleport/src/Login/LoginClose.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { Card } from 'design'; export function LoginClose() { diff --git a/web/packages/teleport/src/Login/LoginFailed.tsx b/web/packages/teleport/src/Login/LoginFailed.tsx index 2c17cfaf84c68..219ef8df85085 100644 --- a/web/packages/teleport/src/Login/LoginFailed.tsx +++ b/web/packages/teleport/src/Login/LoginFailed.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { LoginFailed as CardFailed } from 'design/CardError'; import { Route, Switch } from 'teleport/components/Router'; diff --git a/web/packages/teleport/src/Login/LoginSuccess.tsx b/web/packages/teleport/src/Login/LoginSuccess.tsx index 0258ff9f8ab68..bc105ca684a2e 100644 --- a/web/packages/teleport/src/Login/LoginSuccess.tsx +++ b/web/packages/teleport/src/Login/LoginSuccess.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { CardSuccessLogin } from 'design'; import { LogoHero } from 'teleport/components/LogoHero'; diff --git a/web/packages/teleport/src/Login/LoginTerminalRedirect.tsx b/web/packages/teleport/src/Login/LoginTerminalRedirect.tsx index 9a3ad40044732..2f423da1b0239 100644 --- a/web/packages/teleport/src/Login/LoginTerminalRedirect.tsx +++ b/web/packages/teleport/src/Login/LoginTerminalRedirect.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { LogoHero } from 'teleport/components/LogoHero'; import { CardTerminal } from './CardTerminal'; diff --git a/web/packages/teleport/src/Login/Motd/Motd.tsx b/web/packages/teleport/src/Login/Motd/Motd.tsx index 4805754a8991c..7bf17d63b38fd 100644 --- a/web/packages/teleport/src/Login/Motd/Motd.tsx +++ b/web/packages/teleport/src/Login/Motd/Motd.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Card, Box, Text, ButtonPrimary } from 'design'; diff --git a/web/packages/teleport/src/Main/LayoutContext.tsx b/web/packages/teleport/src/Main/LayoutContext.tsx index 1228d3b8481be..49a8bf48c7017 100644 --- a/web/packages/teleport/src/Main/LayoutContext.tsx +++ b/web/packages/teleport/src/Main/LayoutContext.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { +import { createContext, PropsWithChildren, useContext, diff --git a/web/packages/teleport/src/Main/Main.test.tsx b/web/packages/teleport/src/Main/Main.test.tsx index 3ee64f990a3cf..3ac982e32fc2e 100644 --- a/web/packages/teleport/src/Main/Main.test.tsx +++ b/web/packages/teleport/src/Main/Main.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.story.tsx b/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.story.tsx index 69d563bedaf85..08c64e63bfd21 100644 --- a/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.story.tsx +++ b/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { OnboardDiscover } from './OnboardDiscover'; export default { diff --git a/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.tsx b/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.tsx index eb4474f83bd4d..476173c3cc530 100644 --- a/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.tsx +++ b/web/packages/teleport/src/Main/OnboardDiscover/OnboardDiscover.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonPrimary, ButtonText, Image, Text } from 'design'; import Dialog, { DialogContent, diff --git a/web/packages/teleport/src/Navigation/Navigation.tsx b/web/packages/teleport/src/Navigation/Navigation.tsx index e50295ea5a1f9..8e8085c6eaf85 100644 --- a/web/packages/teleport/src/Navigation/Navigation.tsx +++ b/web/packages/teleport/src/Navigation/Navigation.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled, { useTheme } from 'styled-components'; import { matchPath, useLocation, useHistory } from 'react-router'; import { Box, Text, Flex } from 'design'; diff --git a/web/packages/teleport/src/Navigation/NavigationCategoryContainer.tsx b/web/packages/teleport/src/Navigation/NavigationCategoryContainer.tsx index 983d14f36c1e3..a0321a3e68168 100644 --- a/web/packages/teleport/src/Navigation/NavigationCategoryContainer.tsx +++ b/web/packages/teleport/src/Navigation/NavigationCategoryContainer.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { diff --git a/web/packages/teleport/src/Navigation/NavigationItem.test.tsx b/web/packages/teleport/src/Navigation/NavigationItem.test.tsx index 6f812da3eba84..a8d4e4b26f3f7 100644 --- a/web/packages/teleport/src/Navigation/NavigationItem.test.tsx +++ b/web/packages/teleport/src/Navigation/NavigationItem.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { render, screen } from 'design/utils/testing'; import { Server } from 'design/Icon'; diff --git a/web/packages/teleport/src/Navigation/NavigationSection.tsx b/web/packages/teleport/src/Navigation/NavigationSection.tsx index 62e96f0878c9c..73849244da17f 100644 --- a/web/packages/teleport/src/Navigation/NavigationSection.tsx +++ b/web/packages/teleport/src/Navigation/NavigationSection.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { NavigationItem } from 'teleport/Navigation/NavigationItem'; diff --git a/web/packages/teleport/src/Navigation/RecentHistory.tsx b/web/packages/teleport/src/Navigation/RecentHistory.tsx index 38ae478bd6b2a..8b3941135cfa7 100644 --- a/web/packages/teleport/src/Navigation/RecentHistory.tsx +++ b/web/packages/teleport/src/Navigation/RecentHistory.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect, useRef } from 'react'; +import { useState, useEffect, useRef } from 'react'; import styled from 'styled-components'; import { matchPath } from 'react-router'; import { NavLink } from 'react-router-dom'; diff --git a/web/packages/teleport/src/Navigation/SideNavigation/CategoryIcon.tsx b/web/packages/teleport/src/Navigation/SideNavigation/CategoryIcon.tsx index 944b53c218b2e..8453fdcae2c45 100644 --- a/web/packages/teleport/src/Navigation/SideNavigation/CategoryIcon.tsx +++ b/web/packages/teleport/src/Navigation/SideNavigation/CategoryIcon.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import * as Icons from 'design/Icon'; import { diff --git a/web/packages/teleport/src/Navigation/SideNavigation/ResourcesSection.tsx b/web/packages/teleport/src/Navigation/SideNavigation/ResourcesSection.tsx index 3fdb2c004363b..f1d2859098439 100644 --- a/web/packages/teleport/src/Navigation/SideNavigation/ResourcesSection.tsx +++ b/web/packages/teleport/src/Navigation/SideNavigation/ResourcesSection.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { matchPath } from 'react-router'; diff --git a/web/packages/teleport/src/Navigation/utils.tsx b/web/packages/teleport/src/Navigation/utils.tsx index f45abf8c1d9c1..14b745d311e8b 100644 --- a/web/packages/teleport/src/Navigation/utils.tsx +++ b/web/packages/teleport/src/Navigation/utils.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Icon, NavigationItemSize, diff --git a/web/packages/teleport/src/Notifications/Notification.story.tsx b/web/packages/teleport/src/Notifications/Notification.story.tsx index d8619f66a8227..012472b3a9579 100644 --- a/web/packages/teleport/src/Notifications/Notification.story.tsx +++ b/web/packages/teleport/src/Notifications/Notification.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { subSeconds, subMinutes, subHours, subDays } from 'date-fns'; import { http, HttpResponse, delay } from 'msw'; diff --git a/web/packages/teleport/src/Notifications/Notifications.test.tsx b/web/packages/teleport/src/Notifications/Notifications.test.tsx index 35f4dbb778ca4..4b2ed2157e050 100644 --- a/web/packages/teleport/src/Notifications/Notifications.test.tsx +++ b/web/packages/teleport/src/Notifications/Notifications.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { subMinutes, subSeconds } from 'date-fns'; import { createMemoryHistory } from 'history'; import { Router } from 'react-router'; diff --git a/web/packages/teleport/src/Player/ActionBar/ActionBar.tsx b/web/packages/teleport/src/Player/ActionBar/ActionBar.tsx index 042c5390a73b0..0776791f30a86 100644 --- a/web/packages/teleport/src/Player/ActionBar/ActionBar.tsx +++ b/web/packages/teleport/src/Player/ActionBar/ActionBar.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { NavLink } from 'react-router-dom'; import { Flex, ButtonPrimary } from 'design'; import { MenuIcon, MenuItem, MenuItemIcon } from 'shared/components/MenuAction'; diff --git a/web/packages/teleport/src/Player/DesktopPlayer.tsx b/web/packages/teleport/src/Player/DesktopPlayer.tsx index a0bace9583951..5d164929d6766 100644 --- a/web/packages/teleport/src/Player/DesktopPlayer.tsx +++ b/web/packages/teleport/src/Player/DesktopPlayer.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useMemo, useCallback, useEffect } from 'react'; +import { useState, useMemo, useCallback, useEffect } from 'react'; import styled from 'styled-components'; import { Indicator, Box, Alert, Flex } from 'design'; diff --git a/web/packages/teleport/src/Player/Player.story.tsx b/web/packages/teleport/src/Player/Player.story.tsx index 8a4d33c408921..b1871fb9aba14 100644 --- a/web/packages/teleport/src/Player/Player.story.tsx +++ b/web/packages/teleport/src/Player/Player.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Flex } from 'design'; import { createMemoryHistory } from 'history'; diff --git a/web/packages/teleport/src/Player/Player.tsx b/web/packages/teleport/src/Player/Player.tsx index d6e251e8ea7ae..190f8afb1b558 100644 --- a/web/packages/teleport/src/Player/Player.tsx +++ b/web/packages/teleport/src/Player/Player.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Flex, Box } from 'design'; diff --git a/web/packages/teleport/src/Player/PlayerTabs/PlayerTabs.tsx b/web/packages/teleport/src/Player/PlayerTabs/PlayerTabs.tsx index cee27949cb4b1..8c590415ec2ba 100644 --- a/web/packages/teleport/src/Player/PlayerTabs/PlayerTabs.tsx +++ b/web/packages/teleport/src/Player/PlayerTabs/PlayerTabs.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 { Flex, Box } from 'design'; diff --git a/web/packages/teleport/src/Player/ProgressBar/ProgressBar.story.tsx b/web/packages/teleport/src/Player/ProgressBar/ProgressBar.story.tsx index 1bd315885db2c..67a7f2bcd2294 100644 --- a/web/packages/teleport/src/Player/ProgressBar/ProgressBar.story.tsx +++ b/web/packages/teleport/src/Player/ProgressBar/ProgressBar.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useState } from 'react'; import ProgressBar from './ProgressBar'; @@ -25,7 +25,7 @@ export default { }; export const Playing = () => { - const [state, setState] = React.useState(() => ({ + const [state, setState] = useState(() => ({ isPlaying: true, current: 100, min: 1, diff --git a/web/packages/teleport/src/Player/ProgressBar/Slider/Slider.jsx b/web/packages/teleport/src/Player/ProgressBar/Slider/Slider.jsx index 567ad5f69a13a..89b896e52fe47 100644 --- a/web/packages/teleport/src/Player/ProgressBar/Slider/Slider.jsx +++ b/web/packages/teleport/src/Player/ProgressBar/Slider/Slider.jsx @@ -23,7 +23,7 @@ THE SOFTWARE. */ -import React from 'react'; +import { Children, createElement } from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; @@ -269,7 +269,7 @@ const ReactSlider = createReactClass({ // equally. // TODO: better name? better solution? _or: function (value, defaultValue) { - var count = React.Children.count(this.props.children); + var count = Children.count(this.props.children); switch (count) { case 0: return value.length > 0 ? value : defaultValue; @@ -788,7 +788,7 @@ const ReactSlider = createReactClass({ ' ' + (this.state.index === i ? this.props.handleActiveClassName : ''); - return React.createElement( + return createElement( 'div', { ref: function (r) { @@ -824,8 +824,8 @@ const ReactSlider = createReactClass({ var res = []; var renderHandle = this._renderHandle; - if (React.Children.count(this.props.children) > 0) { - React.Children.forEach(this.props.children, function (child, i) { + if (Children.count(this.props.children) > 0) { + Children.forEach(this.props.children, function (child, i) { res[i] = renderHandle(styles[i], child, i); }); } else { @@ -838,7 +838,7 @@ const ReactSlider = createReactClass({ _renderBar: function (i, offsetFrom, offsetTo) { var self = this; - return React.createElement('div', { + return createElement('div', { key: 'bar' + i, ref: function (r) { self['bar' + i] = r; @@ -917,7 +917,7 @@ const ReactSlider = createReactClass({ var bars = props.withBars ? this._renderBars(offset) : null; var handles = this._renderHandles(offset); - return React.createElement( + return createElement( 'div', { ref: function (r) { diff --git a/web/packages/teleport/src/Player/SshPlayer.tsx b/web/packages/teleport/src/Player/SshPlayer.tsx index ce70754ec6f68..5b833924558d3 100644 --- a/web/packages/teleport/src/Player/SshPlayer.tsx +++ b/web/packages/teleport/src/Player/SshPlayer.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useState, useMemo, useEffect } from 'react'; import styled from 'styled-components'; import { Indicator, Flex, Box } from 'design'; import { Danger } from 'design/Alert'; @@ -100,11 +100,11 @@ const StyledPlayer = styled.div` `; function useStreamingSshPlayer(clusterId: string, sid: string) { - const [playerStatus, setPlayerStatus] = React.useState(StatusEnum.LOADING); - const [statusText, setStatusText] = React.useState(''); - const [time, setTime] = React.useState(0); + const [playerStatus, setPlayerStatus] = useState(StatusEnum.LOADING); + const [statusText, setStatusText] = useState(''); + const [time, setTime] = useState(0); - const tty = React.useMemo(() => { + const tty = useMemo(() => { const url = cfg.api.ttyPlaybackWsAddr .replace(':fqdn', getHostName()) .replace(':clusterId', clusterId) @@ -113,7 +113,7 @@ function useStreamingSshPlayer(clusterId: string, sid: string) { return new TtyPlayer({ url, setPlayerStatus, setStatusText, setTime }); }, [clusterId, sid, setPlayerStatus, setStatusText, setTime]); - React.useEffect(() => { + useEffect(() => { tty.connect(); tty.play(); diff --git a/web/packages/teleport/src/Player/Xterm/Xterm.tsx b/web/packages/teleport/src/Player/Xterm/Xterm.tsx index a5e8ad37dbeac..8e5404b40562c 100644 --- a/web/packages/teleport/src/Player/Xterm/Xterm.tsx +++ b/web/packages/teleport/src/Player/Xterm/Xterm.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useCallback, useRef, useState } from 'react'; +import { useEffect, useCallback, useRef, useState } from 'react'; import { getPlatformType } from 'design/platform'; import styled, { useTheme } from 'styled-components'; diff --git a/web/packages/teleport/src/Recordings/Recordings.story.tsx b/web/packages/teleport/src/Recordings/Recordings.story.tsx index 04a2e58ff9c76..d801bdc7399f2 100644 --- a/web/packages/teleport/src/Recordings/Recordings.story.tsx +++ b/web/packages/teleport/src/Recordings/Recordings.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Router } from 'react-router'; import { createMemoryHistory } from 'history'; diff --git a/web/packages/teleport/src/Recordings/Recordings.tsx b/web/packages/teleport/src/Recordings/Recordings.tsx index d937f8bd708ac..bf3d08a8a98fa 100644 --- a/web/packages/teleport/src/Recordings/Recordings.tsx +++ b/web/packages/teleport/src/Recordings/Recordings.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Danger } from 'design/Alert'; import { Indicator, Box } from 'design'; diff --git a/web/packages/teleport/src/Recordings/RecordingsList.tsx b/web/packages/teleport/src/Recordings/RecordingsList.tsx index 3b43b07622cf4..f0615ffacdae9 100644 --- a/web/packages/teleport/src/Recordings/RecordingsList.tsx +++ b/web/packages/teleport/src/Recordings/RecordingsList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonPrimary } from 'design'; import Table, { Cell, TextCell } from 'design/DataTable'; import { dateTimeMatcher } from 'design/utils/match'; diff --git a/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.story.tsx b/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.story.tsx index 5500061915da3..4188219cd9847 100644 --- a/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.story.tsx +++ b/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import DeleteRole from './DeleteRole'; export default { diff --git a/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.tsx b/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.tsx index 80df8147b37e5..c6fb6637c3545 100644 --- a/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.tsx +++ b/web/packages/teleport/src/Roles/DeleteRole/DeleteRole.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonSecondary, ButtonWarning, Text, Alert, P1 } from 'design'; import Dialog, { DialogHeader, diff --git a/web/packages/teleport/src/Roles/RoleEditor/EditorHeader.tsx b/web/packages/teleport/src/Roles/RoleEditor/EditorHeader.tsx index a453851633c42..16c85c844df4a 100644 --- a/web/packages/teleport/src/Roles/RoleEditor/EditorHeader.tsx +++ b/web/packages/teleport/src/Roles/RoleEditor/EditorHeader.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex, H2, Indicator, Box, ButtonIcon } from 'design'; import { Cross } from 'design/Icon'; diff --git a/web/packages/teleport/src/Roles/RoleEditor/EditorTabs.tsx b/web/packages/teleport/src/Roles/RoleEditor/EditorTabs.tsx index cf93b5e4945a3..a39fddea3e085 100644 --- a/web/packages/teleport/src/Roles/RoleEditor/EditorTabs.tsx +++ b/web/packages/teleport/src/Roles/RoleEditor/EditorTabs.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { SlideTabs } from 'design/SlideTabs'; import * as Icon from 'design/Icon'; diff --git a/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.story.tsx b/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.story.tsx index 8c19879594e0b..14efa8fc69588 100644 --- a/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.story.tsx +++ b/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { StoryObj } from '@storybook/react'; import { delay, http, HttpResponse } from 'msw'; import { Info } from 'design/Alert'; diff --git a/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.test.tsx b/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.test.tsx index 5e9337ef43364..0fa38219bd398 100644 --- a/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.test.tsx +++ b/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render, screen, userEvent } from 'design/utils/testing'; import { within } from '@testing-library/react'; import { UserEvent } from '@testing-library/user-event'; diff --git a/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.tsx b/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.tsx index 9a116f38c2ffc..729360ecb4254 100644 --- a/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.tsx +++ b/web/packages/teleport/src/Roles/RoleEditor/RoleEditor.tsx @@ -17,7 +17,7 @@ */ import { Alert, Box, Flex } from 'design'; -import React, { useId, useState } from 'react'; +import { useId, useState } from 'react'; import { useAsync } from 'shared/hooks/useAsync'; import Validation, { Validator } from 'shared/components/Validation'; diff --git a/web/packages/teleport/src/Roles/RoleEditor/YamlEditor.tsx b/web/packages/teleport/src/Roles/RoleEditor/YamlEditor.tsx index 5f58d7826f2bb..be02e057e013a 100644 --- a/web/packages/teleport/src/Roles/RoleEditor/YamlEditor.tsx +++ b/web/packages/teleport/src/Roles/RoleEditor/YamlEditor.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex } from 'design'; import TextEditor from 'shared/components/TextEditor'; diff --git a/web/packages/teleport/src/Roles/RoleList/RoleList.tsx b/web/packages/teleport/src/Roles/RoleList/RoleList.tsx index 5641442e43d78..4a96dde54e060 100644 --- a/web/packages/teleport/src/Roles/RoleList/RoleList.tsx +++ b/web/packages/teleport/src/Roles/RoleList/RoleList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Table, { Cell } from 'design/DataTable'; import { MenuButton, MenuItem } from 'shared/components/MenuAction'; diff --git a/web/packages/teleport/src/Roles/Roles.story.tsx b/web/packages/teleport/src/Roles/Roles.story.tsx index 9cfdd5c7187d3..ecffcfa4144d9 100644 --- a/web/packages/teleport/src/Roles/Roles.story.tsx +++ b/web/packages/teleport/src/Roles/Roles.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react'; import { Roles } from './Roles'; diff --git a/web/packages/teleport/src/Roles/Roles.tsx b/web/packages/teleport/src/Roles/Roles.tsx index b294bfa9b14c5..1de64f31ae18b 100644 --- a/web/packages/teleport/src/Roles/Roles.tsx +++ b/web/packages/teleport/src/Roles/Roles.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { Alert, Box, Button, Flex, H3, Link } from 'design'; import { P } from 'design/Text/Text'; import { MissingPermissionsTooltip } from 'shared/components/MissingPermissionsTooltip'; diff --git a/web/packages/teleport/src/Sessions/SessionList/SessionJoinBtn.test.tsx b/web/packages/teleport/src/Sessions/SessionList/SessionJoinBtn.test.tsx index c9eddc827e38f..5f90c33767767 100644 --- a/web/packages/teleport/src/Sessions/SessionList/SessionJoinBtn.test.tsx +++ b/web/packages/teleport/src/Sessions/SessionList/SessionJoinBtn.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { fireEvent, render, screen } from 'design/utils/testing'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Sessions/SessionList/SessionList.tsx b/web/packages/teleport/src/Sessions/SessionList/SessionList.tsx index 6883df35ca30d..dd2bc3046b38b 100644 --- a/web/packages/teleport/src/Sessions/SessionList/SessionList.tsx +++ b/web/packages/teleport/src/Sessions/SessionList/SessionList.tsx @@ -18,7 +18,6 @@ import Table, { Cell } from 'design/DataTable'; import * as Icons from 'design/Icon'; -import React from 'react'; import styled from 'styled-components'; import { Participant, Session, SessionKind } from 'teleport/services/session'; diff --git a/web/packages/teleport/src/Sessions/Sessions.story.tsx b/web/packages/teleport/src/Sessions/Sessions.story.tsx index 0770359ead161..7ecfd1fe58538 100644 --- a/web/packages/teleport/src/Sessions/Sessions.story.tsx +++ b/web/packages/teleport/src/Sessions/Sessions.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/Sessions/Sessions.tsx b/web/packages/teleport/src/Sessions/Sessions.tsx index e2f0b7ec509f0..475b4a9c09dce 100644 --- a/web/packages/teleport/src/Sessions/Sessions.tsx +++ b/web/packages/teleport/src/Sessions/Sessions.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Indicator } from 'design'; import { Danger } from 'design/Alert'; import { ClusterDropdown } from 'shared/components/ClusterDropdown/ClusterDropdown'; diff --git a/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.story.tsx b/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.story.tsx index 7fd3b2e2c026e..0bc03aade0e61 100644 --- a/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.story.tsx +++ b/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Router } from 'react-router'; import { createMemoryHistory } from 'history'; diff --git a/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.tsx b/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.tsx index b7c6c576fa409..478e5f0cd3b9d 100644 --- a/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.tsx +++ b/web/packages/teleport/src/SingleLogoutFailed/SingleLogoutFailed.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { useLocation } from 'react-router'; import { LogoutFailed } from 'design/CardError'; diff --git a/web/packages/teleport/src/Support/Support.story.tsx b/web/packages/teleport/src/Support/Support.story.tsx index a5de9cc15ec0e..14578454e38bf 100644 --- a/web/packages/teleport/src/Support/Support.story.tsx +++ b/web/packages/teleport/src/Support/Support.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { ContextProvider } from 'teleport'; diff --git a/web/packages/teleport/src/ThemeProvider.tsx b/web/packages/teleport/src/ThemeProvider.tsx index bc1c16c019f4a..8ce6fc071dbaa 100644 --- a/web/packages/teleport/src/ThemeProvider.tsx +++ b/web/packages/teleport/src/ThemeProvider.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect, ReactNode } from 'react'; +import { useState, useEffect, ReactNode } from 'react'; import { ConfiguredThemeProvider } from 'design/ThemeProvider'; import { bblpTheme, lightTheme, darkTheme, Theme } from 'design/theme'; import { Theme as ThemePreference } from 'gen-proto-ts/teleport/userpreferences/v1/theme_pb'; diff --git a/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.story.tsx b/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.story.tsx index 78f15199d1ba9..134406a72d79f 100644 --- a/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.story.tsx +++ b/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex } from 'design'; import ClusterSelector from './ClusterSelector'; diff --git a/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.tsx b/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.tsx index 3a7aea80cfd2e..268a24eba0840 100644 --- a/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.tsx +++ b/web/packages/teleport/src/TopBar/ClusterSelector/ClusterSelector.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useState } from 'react'; import { components, ValueContainerProps } from 'react-select'; import styled from 'styled-components'; import { Box, Flex, Text } from 'design'; @@ -43,8 +43,8 @@ export default function ClusterSelector({ defaultMenuIsOpen = false, ...styles }) { - const [errorMessage, setError] = React.useState(null); - const [options, setOptions] = React.useState([]); + const [errorMessage, setError] = useState(null); + const [options, setOptions] = useState([]); const selectedOption = { value, diff --git a/web/packages/teleport/src/TopBar/TopBar.story.tsx b/web/packages/teleport/src/TopBar/TopBar.story.tsx index 18c633db54f03..b033d3b552c63 100644 --- a/web/packages/teleport/src/TopBar/TopBar.story.tsx +++ b/web/packages/teleport/src/TopBar/TopBar.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Router } from 'react-router'; import { createMemoryHistory } from 'history'; diff --git a/web/packages/teleport/src/TopBar/TopBar.test.tsx b/web/packages/teleport/src/TopBar/TopBar.test.tsx index 862a89b6bc4e6..990c2d3cb23ac 100644 --- a/web/packages/teleport/src/TopBar/TopBar.test.tsx +++ b/web/packages/teleport/src/TopBar/TopBar.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { act } from '@testing-library/react'; import { subSeconds, subMinutes } from 'date-fns'; import { render, screen, userEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.story.tsx b/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.story.tsx index 6f9017b9e897c..bac658866ac72 100644 --- a/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.story.tsx +++ b/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import DeleteTrustedCluster from './DeleteTrust'; export default { diff --git a/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.tsx b/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.tsx index 972a0e0517508..fec36108208ff 100644 --- a/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.tsx +++ b/web/packages/teleport/src/TrustedClusters/DeleteTrust/DeleteTrust.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonSecondary, ButtonWarning, P1, Text } from 'design'; import * as Alerts from 'design/Alert'; import useAttempt from 'shared/hooks/useAttemptNext'; diff --git a/web/packages/teleport/src/TrustedClusters/TrustedClusters.story.tsx b/web/packages/teleport/src/TrustedClusters/TrustedClusters.story.tsx index 1f45b317e0a36..b66eb37c3a9ca 100644 --- a/web/packages/teleport/src/TrustedClusters/TrustedClusters.story.tsx +++ b/web/packages/teleport/src/TrustedClusters/TrustedClusters.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import * as teleport from 'teleport'; import TrustedClusters from './TrustedClusters'; diff --git a/web/packages/teleport/src/TrustedClusters/TrustedClusters.tsx b/web/packages/teleport/src/TrustedClusters/TrustedClusters.tsx index 9144cf009133b..1e78f6538141a 100644 --- a/web/packages/teleport/src/TrustedClusters/TrustedClusters.tsx +++ b/web/packages/teleport/src/TrustedClusters/TrustedClusters.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Danger } from 'design/Alert'; import { Indicator, Box, Flex, ButtonPrimary, Link, Button, H3 } from 'design'; import Card from 'design/Card'; diff --git a/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedList.tsx b/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedList.tsx index a42c27c0d99e3..9af2cfee027cc 100644 --- a/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedList.tsx +++ b/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex } from 'design'; import TrustedListItem from './TrustedListItem'; diff --git a/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedListItem.tsx b/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedListItem.tsx index 71638aebca715..504a135c3dd58 100644 --- a/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedListItem.tsx +++ b/web/packages/teleport/src/TrustedClusters/TrustedList/TrustedListItem.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Flex, ButtonPrimary } from 'design'; import * as Icons from 'design/Icon'; import { MenuIcon, MenuItem } from 'shared/components/MenuAction'; diff --git a/web/packages/teleport/src/UnifiedResources/UnifiedResources.tsx b/web/packages/teleport/src/UnifiedResources/UnifiedResources.tsx index 0e2b314736e12..a3679b1c6bd75 100644 --- a/web/packages/teleport/src/UnifiedResources/UnifiedResources.tsx +++ b/web/packages/teleport/src/UnifiedResources/UnifiedResources.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback, useState, useMemo } from 'react'; +import { useCallback, useState, useMemo } from 'react'; import { Flex } from 'design'; import { Danger } from 'design/Alert'; diff --git a/web/packages/teleport/src/User/UserContext.test.tsx b/web/packages/teleport/src/User/UserContext.test.tsx index 2c80487df5e43..a5d412d1facde 100644 --- a/web/packages/teleport/src/User/UserContext.test.tsx +++ b/web/packages/teleport/src/User/UserContext.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { setupServer } from 'msw/node'; import { http, HttpResponse } from 'msw'; import { MemoryRouter } from 'react-router'; diff --git a/web/packages/teleport/src/User/UserContext.tsx b/web/packages/teleport/src/User/UserContext.tsx index 66fc27d5b7580..36358b7b32e78 100644 --- a/web/packages/teleport/src/User/UserContext.tsx +++ b/web/packages/teleport/src/User/UserContext.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { +import { createContext, PropsWithChildren, useCallback, diff --git a/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.test.tsx b/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.test.tsx index 0a89e6c79f344..9478b19646c8d 100644 --- a/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.test.tsx +++ b/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { fireEvent, render, screen } from 'design/utils/testing'; import Validation from 'shared/components/Validation'; diff --git a/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.tsx b/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.tsx index 50cba2e758791..2d90f94518d50 100644 --- a/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.tsx +++ b/web/packages/teleport/src/Users/UserAddEdit/TraitsEditor.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { Dispatch, SetStateAction } from 'react'; +import { Dispatch, SetStateAction } from 'react'; import { ButtonBorder, Box, Flex, Text, ButtonIcon } from 'design'; import { Add, Trash } from 'design/Icon'; import { FieldSelectCreatable } from 'shared/components/FieldSelect'; diff --git a/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.story.tsx b/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.story.tsx index e47b534c07cae..dc0cfe00fcbd7 100644 --- a/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.story.tsx +++ b/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { AllUserTraits } from 'teleport/services/user'; diff --git a/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.tsx b/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.tsx index f0a41f5526004..1acf01d8f5766 100644 --- a/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.tsx +++ b/web/packages/teleport/src/Users/UserAddEdit/UserAddEdit.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonPrimary, ButtonSecondary, Alert, Box } from 'design'; import Dialog, { DialogHeader, diff --git a/web/packages/teleport/src/Users/UserDelete/UserDelete.story.tsx b/web/packages/teleport/src/Users/UserDelete/UserDelete.story.tsx index 160bce92d863f..e8f0636c58758 100644 --- a/web/packages/teleport/src/Users/UserDelete/UserDelete.story.tsx +++ b/web/packages/teleport/src/Users/UserDelete/UserDelete.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { UserDelete } from './UserDelete'; export default { diff --git a/web/packages/teleport/src/Users/UserDelete/UserDelete.tsx b/web/packages/teleport/src/Users/UserDelete/UserDelete.tsx index 06064f9be0941..f6ab5685d0eab 100644 --- a/web/packages/teleport/src/Users/UserDelete/UserDelete.tsx +++ b/web/packages/teleport/src/Users/UserDelete/UserDelete.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonWarning, ButtonSecondary, Text, Alert } from 'design'; import Dialog, { DialogHeader, diff --git a/web/packages/teleport/src/Users/UserList/UserList.tsx b/web/packages/teleport/src/Users/UserList/UserList.tsx index 00ad7f5de34cf..715f8743e1735 100644 --- a/web/packages/teleport/src/Users/UserList/UserList.tsx +++ b/web/packages/teleport/src/Users/UserList/UserList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Cell, LabelCell } from 'design/DataTable'; import { MenuButton, MenuItem } from 'shared/components/MenuAction'; diff --git a/web/packages/teleport/src/Users/UserReset/UserReset.story.tsx b/web/packages/teleport/src/Users/UserReset/UserReset.story.tsx index 7f65113c3ef46..fd74a04b68ded 100644 --- a/web/packages/teleport/src/Users/UserReset/UserReset.story.tsx +++ b/web/packages/teleport/src/Users/UserReset/UserReset.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { UserReset } from './UserReset'; export default { diff --git a/web/packages/teleport/src/Users/UserReset/UserReset.tsx b/web/packages/teleport/src/Users/UserReset/UserReset.tsx index 63c8dc49c5d9f..65e15b1a2f2c2 100644 --- a/web/packages/teleport/src/Users/UserReset/UserReset.tsx +++ b/web/packages/teleport/src/Users/UserReset/UserReset.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useState } from 'react'; import { ButtonPrimary, ButtonSecondary, Text, Alert } from 'design'; import Dialog, { DialogHeader, @@ -85,7 +85,7 @@ export function UserReset({ function useDialog(props: Props) { const { attempt, run } = useAttemptNext(); - const [token, setToken] = React.useState(null); + const [token, setToken] = useState(null); function onReset() { run(() => props.onReset(props.username).then(setToken)); diff --git a/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.story.tsx b/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.story.tsx index cef808808e18b..961be76e607c9 100644 --- a/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.story.tsx +++ b/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Dialog from './UserTokenLink'; export default { diff --git a/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.tsx b/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.tsx index e3777fecd2cfd..0177b459bdc20 100644 --- a/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.tsx +++ b/web/packages/teleport/src/Users/UserTokenLink/UserTokenLink.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { formatDistanceStrict } from 'date-fns'; import { ButtonSecondary, Text } from 'design'; diff --git a/web/packages/teleport/src/Users/Users.story.tsx b/web/packages/teleport/src/Users/Users.story.tsx index eaccc82097e9a..9a6a5a4e79c9e 100644 --- a/web/packages/teleport/src/Users/Users.story.tsx +++ b/web/packages/teleport/src/Users/Users.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { Users } from './Users'; diff --git a/web/packages/teleport/src/Users/Users.test.tsx b/web/packages/teleport/src/Users/Users.test.tsx index 0d5d02ee7e710..5a67db85fdb50 100644 --- a/web/packages/teleport/src/Users/Users.test.tsx +++ b/web/packages/teleport/src/Users/Users.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen, userEvent, fireEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/Welcome/CardWelcome.tsx b/web/packages/teleport/src/Welcome/CardWelcome.tsx index 253df5fcf9532..951fe2e0f1084 100644 --- a/web/packages/teleport/src/Welcome/CardWelcome.tsx +++ b/web/packages/teleport/src/Welcome/CardWelcome.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonPrimary, H2, Subtitle2 } from 'design'; import { OnboardCard } from 'teleport/components/Onboard'; diff --git a/web/packages/teleport/src/Welcome/NewCredentials/Expired.tsx b/web/packages/teleport/src/Welcome/NewCredentials/Expired.tsx index e976f1533a48d..173ae15a42848 100644 --- a/web/packages/teleport/src/Welcome/NewCredentials/Expired.tsx +++ b/web/packages/teleport/src/Welcome/NewCredentials/Expired.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { H2, P1 } from 'design'; diff --git a/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.story.tsx b/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.story.tsx index 68860445018a1..3f626a6883d85 100644 --- a/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.story.tsx +++ b/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { WelcomeWrapper } from 'teleport/components/Onboard'; import { diff --git a/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.test.tsx b/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.test.tsx index 6712d9fdda004..a270f2c41b178 100644 --- a/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.test.tsx +++ b/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.test.tsx @@ -19,7 +19,6 @@ import { Attempt } from 'shared/hooks/useAttemptNext'; import { render, screen } from 'design/utils/testing'; -import React from 'react'; import { RecoveryCodes, ResetToken } from 'teleport/services/auth'; import { NewCredentialsProps } from 'teleport/Welcome/NewCredentials/types'; diff --git a/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.tsx b/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.tsx index 730e2c9cfabb6..68a0389b5f589 100644 --- a/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.tsx +++ b/web/packages/teleport/src/Welcome/NewCredentials/NewCredentials.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { NewFlow, StepSlider } from 'design/StepSlider'; import { Box } from 'design'; diff --git a/web/packages/teleport/src/Welcome/NewCredentials/NewMfaDevice.tsx b/web/packages/teleport/src/Welcome/NewCredentials/NewMfaDevice.tsx index 0aec3f22d5922..abf1609db8ec6 100644 --- a/web/packages/teleport/src/Welcome/NewCredentials/NewMfaDevice.tsx +++ b/web/packages/teleport/src/Welcome/NewCredentials/NewMfaDevice.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { SliderProps, UseTokenState, diff --git a/web/packages/teleport/src/Welcome/NewCredentials/Success.tsx b/web/packages/teleport/src/Welcome/NewCredentials/Success.tsx index f5e6840006b56..a533fa689282e 100644 --- a/web/packages/teleport/src/Welcome/NewCredentials/Success.tsx +++ b/web/packages/teleport/src/Welcome/NewCredentials/Success.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonPrimary, Flex, H2, Image, Text } from 'design'; import { OnboardCard } from 'teleport/components/Onboard'; diff --git a/web/packages/teleport/src/Welcome/Welcome.story.tsx b/web/packages/teleport/src/Welcome/Welcome.story.tsx index a65a6a6513a26..b31284c9b1815 100644 --- a/web/packages/teleport/src/Welcome/Welcome.story.tsx +++ b/web/packages/teleport/src/Welcome/Welcome.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { WelcomeWrapper } from 'teleport/components/Onboard'; diff --git a/web/packages/teleport/src/Welcome/Welcome.tsx b/web/packages/teleport/src/Welcome/Welcome.tsx index 2835f469cb0ff..2ad5d54c43afc 100644 --- a/web/packages/teleport/src/Welcome/Welcome.tsx +++ b/web/packages/teleport/src/Welcome/Welcome.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { WelcomeWrapper } from 'teleport/components/Onboard'; import { diff --git a/web/packages/teleport/src/boot.tsx b/web/packages/teleport/src/boot.tsx index 8192e2a2d9965..d1b22f4ea4c10 100644 --- a/web/packages/teleport/src/boot.tsx +++ b/web/packages/teleport/src/boot.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { createRoot } from 'react-dom/client'; import history from 'teleport/services/history'; diff --git a/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.story.tsx b/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.story.tsx index e1987eab36456..7714a46c3ede9 100644 --- a/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.story.tsx +++ b/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { SearchResource } from 'teleport/Discover/SelectResource'; diff --git a/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.tsx b/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.tsx index 9cdcbd05bcc0e..91b2a7923c4c5 100644 --- a/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.tsx +++ b/web/packages/teleport/src/components/AgentButtonAdd/AgentButtonAdd.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link } from 'react-router-dom'; import { Button } from 'design'; diff --git a/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.story.tsx b/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.story.tsx index 3ef9129140609..1a1aa35a5f834 100644 --- a/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.story.tsx +++ b/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import AgentErrorMessage from './AgentErrorMessage'; export default { diff --git a/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.tsx b/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.tsx index 66fadddf24cd6..66d1808a4682f 100644 --- a/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.tsx +++ b/web/packages/teleport/src/components/AgentErrorMessage/AgentErrorMessage.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link } from 'design'; import { Danger } from 'design/Alert'; diff --git a/web/packages/teleport/src/components/AjaxPoller/AjaxPoller.jsx b/web/packages/teleport/src/components/AjaxPoller/AjaxPoller.jsx index 8f1789a4b2952..a74b6e41ea504 100644 --- a/web/packages/teleport/src/components/AjaxPoller/AjaxPoller.jsx +++ b/web/packages/teleport/src/components/AjaxPoller/AjaxPoller.jsx @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -import React from 'react'; +import { Component } from 'react'; const DEFAULT_INTERVAL = 3000; // every 3 sec -export default class AjaxPoller extends React.Component { +export default class AjaxPoller extends Component { _timerId = null; _request = null; diff --git a/web/packages/teleport/src/components/Authenticated/Authenticated.test.tsx b/web/packages/teleport/src/components/Authenticated/Authenticated.test.tsx index cd7da84c6cf6d..8a4103f988466 100644 --- a/web/packages/teleport/src/components/Authenticated/Authenticated.test.tsx +++ b/web/packages/teleport/src/components/Authenticated/Authenticated.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { render, screen, waitFor } from 'design/utils/testing'; import session from 'teleport/services/websession'; diff --git a/web/packages/teleport/src/components/Authenticated/ErrorDialogue.story.tsx b/web/packages/teleport/src/components/Authenticated/ErrorDialogue.story.tsx index 1bcf06242acaa..153caedd1e397 100644 --- a/web/packages/teleport/src/components/Authenticated/ErrorDialogue.story.tsx +++ b/web/packages/teleport/src/components/Authenticated/ErrorDialogue.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { ErrorDialog } from './ErrorDialogue'; export default { diff --git a/web/packages/teleport/src/components/Authenticated/ErrorDialogue.tsx b/web/packages/teleport/src/components/Authenticated/ErrorDialogue.tsx index 4119abee0d7be..493d188ce9c19 100644 --- a/web/packages/teleport/src/components/Authenticated/ErrorDialogue.tsx +++ b/web/packages/teleport/src/components/Authenticated/ErrorDialogue.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Text, Alert, ButtonSecondary } from 'design'; import Dialog, { DialogHeader, diff --git a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.story.tsx b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.story.tsx index b0226bd71faaa..0e493d383efb4 100644 --- a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.story.tsx +++ b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { makeDefaultMfaState } from 'teleport/lib/useMfa'; import AuthnDialog, { Props } from './AuthnDialog'; diff --git a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx index e4752390357e7..516c021c8d452 100644 --- a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx +++ b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { render, screen, fireEvent } from 'design/utils/testing'; import { makeDefaultMfaState, MfaState } from 'teleport/lib/useMfa'; diff --git a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.tsx b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.tsx index a8b87df47de90..0a301b1f16c43 100644 --- a/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.tsx +++ b/web/packages/teleport/src/components/AuthnDialog/AuthnDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Dialog, { DialogContent } from 'design/Dialog'; import { Danger } from 'design/Alert'; import { FingerprintSimple, Cross } from 'design/Icon'; diff --git a/web/packages/teleport/src/components/BannerList/BannerList.story.tsx b/web/packages/teleport/src/components/BannerList/BannerList.story.tsx index b0a60126d97a1..96b83466392fe 100644 --- a/web/packages/teleport/src/components/BannerList/BannerList.story.tsx +++ b/web/packages/teleport/src/components/BannerList/BannerList.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { BannerList } from './BannerList'; export default { diff --git a/web/packages/teleport/src/components/BannerList/BannerList.tsx b/web/packages/teleport/src/components/BannerList/BannerList.tsx index b26e0bba55bae..058bd1db33025 100644 --- a/web/packages/teleport/src/components/BannerList/BannerList.tsx +++ b/web/packages/teleport/src/components/BannerList/BannerList.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 } from 'design'; diff --git a/web/packages/teleport/src/components/BannerList/StandardBanner.test.tsx b/web/packages/teleport/src/components/BannerList/StandardBanner.test.tsx index 7bc41d6d8a5b5..54f93dbf020ef 100644 --- a/web/packages/teleport/src/components/BannerList/StandardBanner.test.tsx +++ b/web/packages/teleport/src/components/BannerList/StandardBanner.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { fireEvent, render, screen, theme } from 'design/utils/testing'; import { userEventService } from 'teleport/services/userEvent'; diff --git a/web/packages/teleport/src/components/BannerList/StandardBanner.tsx b/web/packages/teleport/src/components/BannerList/StandardBanner.tsx index 5cd2e7988a996..1f7148d2c57f9 100644 --- a/web/packages/teleport/src/components/BannerList/StandardBanner.tsx +++ b/web/packages/teleport/src/components/BannerList/StandardBanner.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Banner } from 'design'; import { Action } from 'design/Alert'; diff --git a/web/packages/teleport/src/components/CardEmpty/CardEmpty.jsx b/web/packages/teleport/src/components/CardEmpty/CardEmpty.jsx index a1c19095ec39f..3dc09bc79411f 100644 --- a/web/packages/teleport/src/components/CardEmpty/CardEmpty.jsx +++ b/web/packages/teleport/src/components/CardEmpty/CardEmpty.jsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box, H2 } from 'design'; export default function CardEmpty(props) { diff --git a/web/packages/teleport/src/components/DownloadLinks/DownloadLinks.tsx b/web/packages/teleport/src/components/DownloadLinks/DownloadLinks.tsx index f978966eaef0d..6c1bbc9dc6477 100644 --- a/web/packages/teleport/src/components/DownloadLinks/DownloadLinks.tsx +++ b/web/packages/teleport/src/components/DownloadLinks/DownloadLinks.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box, Link } from 'design'; import getDownloadLink from 'teleport/services/links'; diff --git a/web/packages/teleport/src/components/Empty/Empty.test.tsx b/web/packages/teleport/src/components/Empty/Empty.test.tsx index 3e21afe2c03d1..1049dec678d3a 100644 --- a/web/packages/teleport/src/components/Empty/Empty.test.tsx +++ b/web/packages/teleport/src/components/Empty/Empty.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 { MemoryRouter } from 'react-router'; diff --git a/web/packages/teleport/src/components/Empty/Empty.tsx b/web/packages/teleport/src/components/Empty/Empty.tsx index d7c58f74514fa..cc630f92f081e 100644 --- a/web/packages/teleport/src/components/Empty/Empty.tsx +++ b/web/packages/teleport/src/components/Empty/Empty.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Link } from 'react-router-dom'; import { diff --git a/web/packages/teleport/src/components/EventRangePicker/Custom/Custom.tsx b/web/packages/teleport/src/components/EventRangePicker/Custom/Custom.tsx index 9b7e26383805f..12592b9a57b16 100644 --- a/web/packages/teleport/src/components/EventRangePicker/Custom/Custom.tsx +++ b/web/packages/teleport/src/components/EventRangePicker/Custom/Custom.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, forwardRef } from 'react'; +import { useState, forwardRef } from 'react'; import { isAfter, endOfDay, startOfDay, isSameDay } from 'date-fns'; import { DayPicker, addToRange, DateRange } from 'react-day-picker'; import 'react-day-picker/dist/style.css'; diff --git a/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.story.tsx b/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.story.tsx index 32491f2c1daf7..1b83086c75621 100644 --- a/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.story.tsx +++ b/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import RangePicker from './EventRangePicker'; diff --git a/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.tsx b/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.tsx index 05200a8f020b3..3c33e2a383209 100644 --- a/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.tsx +++ b/web/packages/teleport/src/components/EventRangePicker/EventRangePicker.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { components, ValueContainerProps } from 'react-select'; import 'react-day-picker/dist/style.css'; import { Text, Box } from 'design'; diff --git a/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.test.tsx b/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.test.tsx index 2a6055ce46aa3..c3d78cd75548b 100644 --- a/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.test.tsx +++ b/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { render, screen } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.tsx b/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.tsx index 6db1714a2fe41..f478947ad891a 100644 --- a/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.tsx +++ b/web/packages/teleport/src/components/ExternalAuditStorageCta/ExternalAuditStorageCta.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; import Box from 'design/Box'; diff --git a/web/packages/teleport/src/components/FormLogin/FormLogin.story.tsx b/web/packages/teleport/src/components/FormLogin/FormLogin.story.tsx index c06ca610ef70d..0ff5d1ba98ba2 100644 --- a/web/packages/teleport/src/components/FormLogin/FormLogin.story.tsx +++ b/web/packages/teleport/src/components/FormLogin/FormLogin.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import FormLogin, { Props } from './FormLogin'; const props: Props = { diff --git a/web/packages/teleport/src/components/FormLogin/FormLogin.test.tsx b/web/packages/teleport/src/components/FormLogin/FormLogin.test.tsx index 41a47ca5061b6..aa2da17755745 100644 --- a/web/packages/teleport/src/components/FormLogin/FormLogin.test.tsx +++ b/web/packages/teleport/src/components/FormLogin/FormLogin.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { render, fireEvent, screen } from 'design/utils/testing'; import history from 'teleport/services/history'; diff --git a/web/packages/teleport/src/components/FormLogin/SsoButtons.tsx b/web/packages/teleport/src/components/FormLogin/SsoButtons.tsx index 92d253c5eafd4..a57cb3be1e497 100644 --- a/web/packages/teleport/src/components/FormLogin/SsoButtons.tsx +++ b/web/packages/teleport/src/components/FormLogin/SsoButtons.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { Flex, Text } from 'design'; import ButtonSso, { guessProviderType } from 'shared/components/ButtonSso'; import { AuthProvider } from 'shared/services'; diff --git a/web/packages/teleport/src/components/HeadlessRequestDialog/HeadlessRequestDialog.tsx b/web/packages/teleport/src/components/HeadlessRequestDialog/HeadlessRequestDialog.tsx index bc7654c8afb1e..423a9ee6699f6 100644 --- a/web/packages/teleport/src/components/HeadlessRequestDialog/HeadlessRequestDialog.tsx +++ b/web/packages/teleport/src/components/HeadlessRequestDialog/HeadlessRequestDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import Dialog, { DialogContent, DialogFooter, diff --git a/web/packages/teleport/src/components/InputSearch/InputSearch.jsx b/web/packages/teleport/src/components/InputSearch/InputSearch.jsx index 295d899e10ddc..88e6d5e7345d0 100644 --- a/web/packages/teleport/src/components/InputSearch/InputSearch.jsx +++ b/web/packages/teleport/src/components/InputSearch/InputSearch.jsx @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -import React from 'react'; +import { Component } from 'react'; import { debounce } from 'shared/utils/highbar'; import styled from 'styled-components'; import { height, space, color } from 'design/system'; -class InputSearch extends React.Component { +class InputSearch extends Component { constructor(props) { super(props); this.debouncedNotify = debounce(() => { diff --git a/web/packages/teleport/src/components/LabelSelector/LabelSelector.story.tsx b/web/packages/teleport/src/components/LabelSelector/LabelSelector.story.tsx index fadaac7e1cd5b..14ce88db30c30 100644 --- a/web/packages/teleport/src/components/LabelSelector/LabelSelector.story.tsx +++ b/web/packages/teleport/src/components/LabelSelector/LabelSelector.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { LabelSelector } from './LabelSelector'; diff --git a/web/packages/teleport/src/components/LabelSelector/LabelSelector.test.tsx b/web/packages/teleport/src/components/LabelSelector/LabelSelector.test.tsx index 572b451884e7c..aed64b5a02616 100644 --- a/web/packages/teleport/src/components/LabelSelector/LabelSelector.test.tsx +++ b/web/packages/teleport/src/components/LabelSelector/LabelSelector.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { render, screen, fireEvent } from 'design/utils/testing'; import { LabelSelector } from './LabelSelector'; diff --git a/web/packages/teleport/src/components/LabelSelector/LabelSelector.tsx b/web/packages/teleport/src/components/LabelSelector/LabelSelector.tsx index 026aeef9c9135..4551d96a13a43 100644 --- a/web/packages/teleport/src/components/LabelSelector/LabelSelector.tsx +++ b/web/packages/teleport/src/components/LabelSelector/LabelSelector.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; import { Box, Flex, Pill, Popover, Link, Text } from 'design'; diff --git a/web/packages/teleport/src/components/LabelsInput/LabelsInput.story.tsx b/web/packages/teleport/src/components/LabelsInput/LabelsInput.story.tsx index b6671f3a801fd..257b3e8ac4286 100644 --- a/web/packages/teleport/src/components/LabelsInput/LabelsInput.story.tsx +++ b/web/packages/teleport/src/components/LabelsInput/LabelsInput.story.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { useState } from 'react'; import Validation from 'shared/components/Validation'; import { ButtonSecondary } from 'design/Button'; diff --git a/web/packages/teleport/src/components/LogoHero/LogoHero.tsx b/web/packages/teleport/src/components/LogoHero/LogoHero.tsx index 711d549fe05e9..a0e392c74bfce 100644 --- a/web/packages/teleport/src/components/LogoHero/LogoHero.tsx +++ b/web/packages/teleport/src/components/LogoHero/LogoHero.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { useTheme } from 'styled-components'; import Image from 'design/Image'; import AGPLLogoLight from 'design/assets/images/agpl-light.svg'; diff --git a/web/packages/teleport/src/components/MfaDeviceList/MfaDeviceList.tsx b/web/packages/teleport/src/components/MfaDeviceList/MfaDeviceList.tsx index 8684aa094d8f7..f4ec3dc873176 100644 --- a/web/packages/teleport/src/components/MfaDeviceList/MfaDeviceList.tsx +++ b/web/packages/teleport/src/components/MfaDeviceList/MfaDeviceList.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { ButtonBorder, Text } from 'design'; import Table, { Cell } from 'design/DataTable'; diff --git a/web/packages/teleport/src/components/MfaDeviceList/RemoveDialog/RemoveDialog.tsx b/web/packages/teleport/src/components/MfaDeviceList/RemoveDialog/RemoveDialog.tsx index 55f9682474410..259947c55f91a 100644 --- a/web/packages/teleport/src/components/MfaDeviceList/RemoveDialog/RemoveDialog.tsx +++ b/web/packages/teleport/src/components/MfaDeviceList/RemoveDialog/RemoveDialog.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { ButtonSecondary, ButtonWarning, P1, Text } from 'design'; import { Danger } from 'design/Alert'; import Dialog, { DialogContent, DialogFooter } from 'design/DialogConfirmation'; diff --git a/web/packages/teleport/src/components/NewMfaDeviceForm/NewMfaDeviceForm.test.tsx b/web/packages/teleport/src/components/NewMfaDeviceForm/NewMfaDeviceForm.test.tsx index 851b9acfb6172..f4ee056929d93 100644 --- a/web/packages/teleport/src/components/NewMfaDeviceForm/NewMfaDeviceForm.test.tsx +++ b/web/packages/teleport/src/components/NewMfaDeviceForm/NewMfaDeviceForm.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { render, screen, userEvent } from 'design/utils/testing'; import { NewMfaDeviceForm, NewMfaDeviceFormProps } from './NewMfaDeviceForm'; diff --git a/web/packages/teleport/src/components/Onboard/OnboardFooter.story.tsx b/web/packages/teleport/src/components/Onboard/OnboardFooter.story.tsx index c60d9b99eb9db..c5c9c73a09d09 100644 --- a/web/packages/teleport/src/components/Onboard/OnboardFooter.story.tsx +++ b/web/packages/teleport/src/components/Onboard/OnboardFooter.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { OnboardFooter } from './OnboardFooter'; export default { diff --git a/web/packages/teleport/src/components/Onboard/OnboardFooter.test.tsx b/web/packages/teleport/src/components/Onboard/OnboardFooter.test.tsx index 8f551108d350e..1f711935d20e9 100644 --- a/web/packages/teleport/src/components/Onboard/OnboardFooter.test.tsx +++ b/web/packages/teleport/src/components/Onboard/OnboardFooter.test.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { render, screen } from 'design/utils/testing'; import { OnboardFooter } from './OnboardFooter'; diff --git a/web/packages/teleport/src/components/Onboard/OnboardFooter.tsx b/web/packages/teleport/src/components/Onboard/OnboardFooter.tsx index 1719d9fcd06b0..f01807ccae42b 100644 --- a/web/packages/teleport/src/components/Onboard/OnboardFooter.tsx +++ b/web/packages/teleport/src/components/Onboard/OnboardFooter.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import styled from 'styled-components'; import { Flex, Link, Text } from 'design'; diff --git a/web/packages/teleport/src/components/Onboard/WelcomeWrapper.story.tsx b/web/packages/teleport/src/components/Onboard/WelcomeWrapper.story.tsx index b9b740c44620e..200ab8ba8caca 100644 --- a/web/packages/teleport/src/components/Onboard/WelcomeWrapper.story.tsx +++ b/web/packages/teleport/src/components/Onboard/WelcomeWrapper.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Text } from 'design'; import { WelcomeWrapper } from './WelcomeWrapper'; diff --git a/web/packages/teleport/src/components/Onboard/WelcomeWrapper.tsx b/web/packages/teleport/src/components/Onboard/WelcomeWrapper.tsx index 673c0cbbf7c00..9ee6622729e71 100644 --- a/web/packages/teleport/src/components/Onboard/WelcomeWrapper.tsx +++ b/web/packages/teleport/src/components/Onboard/WelcomeWrapper.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import styled from 'styled-components'; import { Box, Flex } from 'design'; diff --git a/web/packages/teleport/src/components/Passkeys/PasskeyBlurb.tsx b/web/packages/teleport/src/components/Passkeys/PasskeyBlurb.tsx index 73058170e9269..bfd1b73ebd8e5 100644 --- a/web/packages/teleport/src/components/Passkeys/PasskeyBlurb.tsx +++ b/web/packages/teleport/src/components/Passkeys/PasskeyBlurb.tsx @@ -17,7 +17,6 @@ */ import Box from 'design/Box'; -import React from 'react'; import { PasskeyIcons } from 'teleport/components/Passkeys'; diff --git a/web/packages/teleport/src/components/Passkeys/PasskeyIcons.tsx b/web/packages/teleport/src/components/Passkeys/PasskeyIcons.tsx index fd98a28205c98..41f61a216913d 100644 --- a/web/packages/teleport/src/components/Passkeys/PasskeyIcons.tsx +++ b/web/packages/teleport/src/components/Passkeys/PasskeyIcons.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import * as Icon from 'design/Icon'; diff --git a/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.story.tsx b/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.story.tsx index bb444a74df67e..a5750b919a741 100644 --- a/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.story.tsx +++ b/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import Component from './RecoveryCodes'; export default { diff --git a/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.tsx b/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.tsx index 729d684242c09..d088a3d30450e 100644 --- a/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.tsx +++ b/web/packages/teleport/src/components/RecoveryCodes/RecoveryCodes.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 { Box, ButtonPrimary, Card, Flex, Text } from 'design'; import { copyToClipboard } from 'design/utils/copyToClipboard'; diff --git a/web/packages/teleport/src/components/ResourceEditor/ResourceEditor.story.jsx b/web/packages/teleport/src/components/ResourceEditor/ResourceEditor.story.jsx index f1c18dadb3573..ca8ad4a805a2e 100644 --- a/web/packages/teleport/src/components/ResourceEditor/ResourceEditor.story.jsx +++ b/web/packages/teleport/src/components/ResourceEditor/ResourceEditor.story.jsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import ResourceEditor from './ResourceEditor'; export default { diff --git a/web/packages/teleport/src/components/Router/Router.jsx b/web/packages/teleport/src/components/Router/Router.jsx index f124f79ae26fc..00ab4c7428e56 100644 --- a/web/packages/teleport/src/components/Router/Router.jsx +++ b/web/packages/teleport/src/components/Router/Router.jsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useEffect } from 'react'; import { useRouteMatch, useParams, @@ -46,7 +46,7 @@ const Route = props => { const { title = '', ...rest } = props; const { clusterId } = useParams(); - React.useEffect(() => { + useEffect(() => { if (title && clusterId) { document.title = `${clusterId} • ${title}`; } else if (title) { diff --git a/web/packages/teleport/src/components/SelectFilters/Pager.tsx b/web/packages/teleport/src/components/SelectFilters/Pager.tsx index 39aaeb5b215ee..d006f4fc270c2 100644 --- a/web/packages/teleport/src/components/SelectFilters/Pager.tsx +++ b/web/packages/teleport/src/components/SelectFilters/Pager.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { CircleArrowLeft, CircleArrowRight } from 'design/Icon'; import { Text, Flex } from 'design'; diff --git a/web/packages/teleport/src/components/SelectFilters/SelectFilters.story.tsx b/web/packages/teleport/src/components/SelectFilters/SelectFilters.story.tsx index 76d8f45ddf09d..d8da9f71e1781 100644 --- a/web/packages/teleport/src/components/SelectFilters/SelectFilters.story.tsx +++ b/web/packages/teleport/src/components/SelectFilters/SelectFilters.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import SelectFilter, { Props } from './SelectFilters'; export default { diff --git a/web/packages/teleport/src/components/SelectFilters/usePages.ts b/web/packages/teleport/src/components/SelectFilters/usePages.ts index 90ce7107a69f2..83808ddc8011c 100644 --- a/web/packages/teleport/src/components/SelectFilters/usePages.ts +++ b/web/packages/teleport/src/components/SelectFilters/usePages.ts @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useState, useEffect } from 'react'; export default function usePages({ pageSize, data }) { - const [startFrom, setFrom] = React.useState(0); + const [startFrom, setFrom] = useState(0); // set current page to 0 when data source length changes - React.useEffect(() => { + useEffect(() => { setFrom(0); }, [data.length]); diff --git a/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanel.tsx b/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanel.tsx index 01ece4cb6e1f5..357f9753ca2f3 100644 --- a/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanel.tsx +++ b/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanel.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex } from 'design'; import { AdvancedSearchToggle } from 'shared/components/AdvancedSearchToggle'; diff --git a/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanelWithPageIndicator.tsx b/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanelWithPageIndicator.tsx index be9ef01c15363..c4f48ae7fee68 100644 --- a/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanelWithPageIndicator.tsx +++ b/web/packages/teleport/src/components/ServersideSearchPanel/ServersideSearchPanelWithPageIndicator.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Flex } from 'design'; import { PageIndicatorText } from 'design/DataTable/Pager/PageIndicatorText'; diff --git a/web/packages/teleport/src/components/TabIcon/TabIcon.tsx b/web/packages/teleport/src/components/TabIcon/TabIcon.tsx index d7fb752ef39c4..0d7101714c96a 100644 --- a/web/packages/teleport/src/components/TabIcon/TabIcon.tsx +++ b/web/packages/teleport/src/components/TabIcon/TabIcon.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { H3 } from 'design'; diff --git a/web/packages/teleport/src/components/Tabs/Tabs.story.tsx b/web/packages/teleport/src/components/Tabs/Tabs.story.tsx index 9e6710104f817..81427eea19e1b 100644 --- a/web/packages/teleport/src/components/Tabs/Tabs.story.tsx +++ b/web/packages/teleport/src/components/Tabs/Tabs.story.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { TextSelectCopyMulti } from '../TextSelectCopy'; import { Tabs } from './Tabs'; diff --git a/web/packages/teleport/src/components/Tabs/Tabs.tsx b/web/packages/teleport/src/components/Tabs/Tabs.tsx index 80e1dfb70dd11..ec97f26920eba 100644 --- a/web/packages/teleport/src/components/Tabs/Tabs.tsx +++ b/web/packages/teleport/src/components/Tabs/Tabs.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useState } from 'react'; +import { Fragment, useState } from 'react'; import { Box, Flex } from 'design'; export function Tabs({ tabs }: Props) { @@ -37,7 +37,7 @@ export function Tabs({ tabs }: Props) { {tabs.map((tab, index) => { const isActive = index === currContentIndex; return ( - + {isActive ? ( )} - + ); })} diff --git a/web/packages/teleport/src/components/TdpClientCanvas/TdpClientCanvas.tsx b/web/packages/teleport/src/components/TdpClientCanvas/TdpClientCanvas.tsx index b1f5e11b08ccc..de20cb6e79517 100644 --- a/web/packages/teleport/src/components/TdpClientCanvas/TdpClientCanvas.tsx +++ b/web/packages/teleport/src/components/TdpClientCanvas/TdpClientCanvas.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { memo, useEffect, useRef } from 'react'; +import { memo, useEffect, useRef } from 'react'; import { DebouncedFunc } from 'shared/utils/highbar'; import { TdpClientEvent, TdpClient } from 'teleport/lib/tdp'; diff --git a/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.story.tsx b/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.story.tsx index 4af3f5f6cada7..f653d9b43f0be 100644 --- a/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.story.tsx +++ b/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Box } from 'design'; diff --git a/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.test.tsx b/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.test.tsx index 937b8c78c43ac..967a8f6342891 100644 --- a/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.test.tsx +++ b/web/packages/teleport/src/components/ToolTipBadge/ToolTipBadge.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { render, screen, userEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.story.tsx b/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.story.tsx index 9017ffceb05c5..c13b2b59ae660 100644 --- a/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.story.tsx +++ b/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { Box } from 'design'; diff --git a/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.test.tsx b/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.test.tsx index 7dcd85dfd505b..dad665b8343ae 100644 --- a/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.test.tsx +++ b/web/packages/teleport/src/components/ToolTipNoPermBadge/ToolTipNoPermBadge.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import styled from 'styled-components'; import { render, screen, userEvent } from 'design/utils/testing'; diff --git a/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.story.tsx b/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.story.tsx index 1bac561e8764b..7b52fe6a1e612 100644 --- a/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.story.tsx +++ b/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import * as Icons from 'design/Icon'; diff --git a/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.test.tsx b/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.test.tsx index 8568622991215..b02f6fba17247 100644 --- a/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.test.tsx +++ b/web/packages/teleport/src/components/UserMenuNav/UserMenuNav.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { MemoryRouter } from 'react-router'; import { diff --git a/web/packages/teleport/src/components/Wizard/Navigation/Bullet.tsx b/web/packages/teleport/src/components/Wizard/Navigation/Bullet.tsx index d9650d7bb7328..22ff59a49c77d 100644 --- a/web/packages/teleport/src/components/Wizard/Navigation/Bullet.tsx +++ b/web/packages/teleport/src/components/Wizard/Navigation/Bullet.tsx @@ -17,7 +17,6 @@ */ import Flex from 'design/Flex'; -import React from 'react'; import styled from 'styled-components'; export type Props = { diff --git a/web/packages/teleport/src/components/Wizard/Navigation/Navigation.story.tsx b/web/packages/teleport/src/components/Wizard/Navigation/Navigation.story.tsx index be358abfa6dc8..3c4f3dd6a792f 100644 --- a/web/packages/teleport/src/components/Wizard/Navigation/Navigation.story.tsx +++ b/web/packages/teleport/src/components/Wizard/Navigation/Navigation.story.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Box } from 'design'; import { addIndexToViews } from '../flow'; diff --git a/web/packages/teleport/src/components/Wizard/Navigation/Navigation.test.tsx b/web/packages/teleport/src/components/Wizard/Navigation/Navigation.test.tsx index cc9c307e041c8..5fcec239014ee 100644 --- a/web/packages/teleport/src/components/Wizard/Navigation/Navigation.test.tsx +++ b/web/packages/teleport/src/components/Wizard/Navigation/Navigation.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 { Navigation } from './Navigation'; diff --git a/web/packages/teleport/src/components/Wizard/Navigation/Navigation.tsx b/web/packages/teleport/src/components/Wizard/Navigation/Navigation.tsx index 01fad8c7aec9c..1fe4ae34c68af 100644 --- a/web/packages/teleport/src/components/Wizard/Navigation/Navigation.tsx +++ b/web/packages/teleport/src/components/Wizard/Navigation/Navigation.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Flex } from 'design'; import { BaseView } from '../flow'; diff --git a/web/packages/teleport/src/components/Wizard/Navigation/StepItem.tsx b/web/packages/teleport/src/components/Wizard/Navigation/StepItem.tsx index 4236d85471209..06bf434f56c98 100644 --- a/web/packages/teleport/src/components/Wizard/Navigation/StepItem.tsx +++ b/web/packages/teleport/src/components/Wizard/Navigation/StepItem.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { StepTitle, StepsContainer, diff --git a/web/packages/teleport/src/components/Wizard/Navigation/StepList.tsx b/web/packages/teleport/src/components/Wizard/Navigation/StepList.tsx index e4dec58e714d8..9ca9d0c24c08c 100644 --- a/web/packages/teleport/src/components/Wizard/Navigation/StepList.tsx +++ b/web/packages/teleport/src/components/Wizard/Navigation/StepList.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { BaseView } from '../flow'; import { StepItem } from './StepItem'; diff --git a/web/packages/teleport/src/components/Wizard/flow.test.tsx b/web/packages/teleport/src/components/Wizard/flow.test.tsx index b89b884007d71..6bf12f13d34e9 100644 --- a/web/packages/teleport/src/components/Wizard/flow.test.tsx +++ b/web/packages/teleport/src/components/Wizard/flow.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 { Navigation } from './Navigation'; diff --git a/web/packages/teleport/src/components/hooks/useUrlFiltering/useUrlFiltering.test.tsx b/web/packages/teleport/src/components/hooks/useUrlFiltering/useUrlFiltering.test.tsx index 45646cb0d5ac8..01916c2cf1f2a 100644 --- a/web/packages/teleport/src/components/hooks/useUrlFiltering/useUrlFiltering.test.tsx +++ b/web/packages/teleport/src/components/hooks/useUrlFiltering/useUrlFiltering.test.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; import { Router } from 'react-router'; import { createMemoryHistory } from 'history'; import renderHook from 'design/utils/renderHook'; diff --git a/web/packages/teleport/src/features.tsx b/web/packages/teleport/src/features.tsx index 1ee0d23d0c958..c95464d41e959 100644 --- a/web/packages/teleport/src/features.tsx +++ b/web/packages/teleport/src/features.tsx @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -import React from 'react'; - import { Bots as BotsIcon, CirclePlay, diff --git a/web/packages/teleport/src/useTeleport.ts b/web/packages/teleport/src/useTeleport.ts index c7f0149cc3e81..2552f3dbe559f 100644 --- a/web/packages/teleport/src/useTeleport.ts +++ b/web/packages/teleport/src/useTeleport.ts @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -import React from 'react'; +import { useContext } from 'react'; import { ReactContext } from './TeleportContextProvider'; export default function useTeleport() { - const teleportContext = React.useContext(ReactContext); + const teleportContext = useContext(ReactContext); if (!teleportContext) { throw new Error('Unable to retrieve Teleport Context'); } diff --git a/web/packages/teleterm/src/ui/AccessRequestCheckout/AccessRequestCheckout.tsx b/web/packages/teleterm/src/ui/AccessRequestCheckout/AccessRequestCheckout.tsx index 425da0524a92b..2cc34cb15c676 100644 --- a/web/packages/teleterm/src/ui/AccessRequestCheckout/AccessRequestCheckout.tsx +++ b/web/packages/teleterm/src/ui/AccessRequestCheckout/AccessRequestCheckout.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import React, { useRef } from 'react'; +import { useRef } from 'react'; import { Transition } from 'react-transition-group'; import {