Skip to content

Commit

Permalink
Remove unused React imports from packages/teleterm
Browse files Browse the repository at this point in the history
  • Loading branch information
gzdunek committed Dec 13, 2024
1 parent 941a993 commit aa8409a
Show file tree
Hide file tree
Showing 91 changed files with 43 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import styled from 'styled-components';
import { Box, Flex, Text } from 'design';
import { pluralize } from 'shared/utils/text';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useCallback, useEffect, useState } from 'react';
import { useCallback, useEffect, useState } from 'react';
import styled from 'styled-components';
import { Indicator } from 'design';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { PropsWithChildren } from 'react';
import { PropsWithChildren } from 'react';

import Dialog from 'design/Dialog';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import styled from 'styled-components';
import { Text, Flex, ButtonText, Box } from 'design';
import { Key, ArrowForward } from 'design/Icon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider';

import { ClusterLogout } from './ClusterLogout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import DialogConfirmation, {
DialogContent,
DialogFooter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { screen } from '@testing-library/react';
import { render } from 'design/utils/testing';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { Text, ButtonPrimary, Alert, Flex } from 'design';
import Link from 'design/Link';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useCallback } from 'react';
import { useCallback } from 'react';

import Indicator from 'design/Indicator';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useEffect, useRef, useLayoutEffect } from 'react';
import { useEffect, useRef, useLayoutEffect } from 'react';

import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider';
import { MockAppContext } from 'teleterm/ui/fixtures/mocks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useCallback, useEffect, useState } from 'react';
import { useCallback, useEffect, useState } from 'react';
import styled from 'styled-components';
import { Box, ButtonPrimary, Flex, Text, Alert, H1 } from 'design';
import { Attempt, makeEmptyAttempt, useAsync } from 'shared/hooks/useAsync';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useLayoutEffect } from 'react';
import { useLayoutEffect } from 'react';

import {
makeRootCluster,
Expand Down
1 change: 0 additions & 1 deletion web/packages/teleterm/src/ui/ConnectMyComputer/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

import { Flex, Text } from 'design';
import React from 'react';

interface LogsProps {
logs: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useEffect, useRef, useLayoutEffect } from 'react';
import { useEffect, useRef, useLayoutEffect } from 'react';

import { MockWorkspaceContextProvider } from 'teleterm/ui/fixtures/MockWorkspaceContextProvider';
import { makeRootCluster } from 'teleterm/services/tshd/testHelpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { forwardRef, useRef, useState } from 'react';
import { forwardRef, useRef, useState } from 'react';
import styled, { css } from 'styled-components';
import { Box, Button, Indicator, Menu, MenuItem, blink } from 'design';
import { Laptop, Warning } from 'design/Icon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { render } from 'design/utils/testing';
import { screen } from '@testing-library/react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { Alert, Text } from 'design';
import Link from 'design/Link';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { Attempt } from 'shared/hooks/useAsync';

import { AccessRequest } from 'shared/services/accessRequests';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { MemoryRouter } from 'react-router-dom';
import { fireEvent, render, screen } from 'design/utils/testing';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import styled from 'styled-components';

import { Label, Alert, ButtonBorder, Flex, ButtonPrimary, Box } from 'design';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useEffect } from 'react';
import { useEffect } from 'react';
import styled from 'styled-components';

import AppContextProvider from 'teleterm/ui/appContextProvider';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { act } from '@testing-library/react';
import { render, screen } from 'design/utils/testing';
import { mockIntersectionObserver } from 'jsdom-testing-mocks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useEffect } from 'react';
import { useEffect } from 'react';
import styled from 'styled-components';
import { Box, ButtonPrimary, Flex, Text, Alert, H2 } from 'design';
import { useAsync, Attempt } from 'shared/hooks/useAsync';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { renderHook } from '@testing-library/react';

import { rootClusterUri } from 'teleterm/services/tshd/testHelpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { Box, ButtonPrimary, Flex, Indicator } from 'design';
import { fade } from 'design/theme/utils/colorManipulator';
import styled from 'styled-components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import {
makeEmptyAttempt,
makeProcessingAttempt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import Document from 'teleterm/ui/Document';
import * as types from 'teleterm/ui/services/workspacesService';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useMemo, useRef } from 'react';
import { useMemo, useRef } from 'react';
import { debounce } from 'shared/utils/highbar';
import { Box, ButtonSecondary, Flex, H1, H2, Link, Text } from 'design';
import Validation from 'shared/components/Validation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { renderHook, act, waitFor } from '@testing-library/react';

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { wait } from 'shared/utils/wait';

import { DocumentGatewayApp } from 'teleterm/ui/DocumentGatewayApp/DocumentGatewayApp';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { DocumentGatewayCliClient } from 'teleterm/ui/services/workspacesService';

import { WaitingForGatewayContent } from './DocumentGatewayCliClient';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import styled from 'styled-components';
import { Flex, Text, ButtonPrimary } from 'design';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import * as types from 'teleterm/ui/services/workspacesService';
import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider';
import { MockAppContext } from 'teleterm/ui/fixtures/mocks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useEffect } from 'react';
import { useEffect } from 'react';

import { useAsync } from 'shared/hooks/useAsync';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useCallback, useState } from 'react';
import { useCallback, useState } from 'react';
import {
FileTransferActionBar,
FileTransfer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { Flex, Text, ButtonPrimary } from 'design';
import { Danger } from 'design/Alert';
import { Attempt } from 'shared/hooks/useAsync';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { renderHook, waitFor } from '@testing-library/react';
import 'jest-canvas-mock';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { Text } from 'design';

import styled from 'styled-components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider';

import { DocumentsReopen } from './DocumentsReopen';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import DialogConfirmation, {
DialogContent,
DialogFooter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useRef, useEffect } from 'react';
import { useRef, useEffect } from 'react';

import { useAsync } from 'shared/hooks/useAsync';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { makeEmptyAttempt } from 'shared/hooks/useAsync';

import { makeRootCluster } from 'teleterm/services/tshd/testHelpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useState } from 'react';
import { useState } from 'react';
import * as Alerts from 'design/Alert';
import {
ButtonIcon,
Expand Down
2 changes: 1 addition & 1 deletion web/packages/teleterm/src/ui/LayoutManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { useRef } from 'react';
import { useRef } from 'react';
import { Flex } from 'design';

import { AccessRequestCheckout } from 'teleterm/ui/AccessRequestCheckout';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/teleterm/src/ui/ModalsHost/ModalsHost.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { MockAppContextProvider } from 'teleterm/ui/fixtures/MockAppContextProvider';
import { MockAppContext } from 'teleterm/ui/fixtures/mocks';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { render, screen } from 'design/utils/testing';
import { act } from '@testing-library/react';

Expand Down
Loading

0 comments on commit aa8409a

Please sign in to comment.