diff --git a/.eslintrc.js b/.eslintrc.js index 3d54b0c8fe9..4528c2fed2d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,6 +13,7 @@ module.exports = { 'prettier', 'plugin:json/recommended', 'plugin:storybook/recommended', + 'plugin:react/jsx-runtime', ], plugins: ['react', 'react-hooks', 'json', 'testing-library'], diff --git a/.storybook/preview.jsx b/.storybook/preview.jsx index 4d97efe9c4d..bdae9a4f833 100644 --- a/.storybook/preview.jsx +++ b/.storybook/preview.jsx @@ -1,4 +1,3 @@ -import React from 'react' import { I18nextProvider } from 'react-i18next' import { GlobalStyle } from '../app/src/atoms/GlobalStyle' import { i18n } from '../app/src/i18n' diff --git a/app/src/App/DesktopApp.tsx b/app/src/App/DesktopApp.tsx index ee191db1f37..8bbfd2ec590 100644 --- a/app/src/App/DesktopApp.tsx +++ b/app/src/App/DesktopApp.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, Fragment } from 'react' import { Navigate, Route, Routes, useMatch } from 'react-router-dom' import { ErrorBoundary } from 'react-error-boundary' import { I18nextProvider } from 'react-i18next' @@ -46,7 +46,7 @@ export const DesktopApp = (): JSX.Element => { const [ isEmergencyStopModalDismissed, setIsEmergencyStopModalDismissed, - ] = React.useState(false) + ] = useState(false) const desktopRoutes: RouteProps[] = [ { @@ -124,7 +124,7 @@ export const DesktopApp = (): JSX.Element => { + { - + } path={path} /> diff --git a/app/src/App/DesktopAppFallback.tsx b/app/src/App/DesktopAppFallback.tsx index a1bb6528f45..1bf2645e8b1 100644 --- a/app/src/App/DesktopAppFallback.tsx +++ b/app/src/App/DesktopAppFallback.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch } from 'react-redux' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' diff --git a/app/src/App/ODDTopLevelRedirects/index.tsx b/app/src/App/ODDTopLevelRedirects/index.tsx index 2bda4c52f94..fa0692bd1c4 100644 --- a/app/src/App/ODDTopLevelRedirects/index.tsx +++ b/app/src/App/ODDTopLevelRedirects/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Navigate, Route, Routes } from 'react-router-dom' import { useCurrentRunId } from '/app/resources/runs' diff --git a/app/src/App/OnDeviceDisplayApp.tsx b/app/src/App/OnDeviceDisplayApp.tsx index 66ae7a641ba..396cfdb4484 100644 --- a/app/src/App/OnDeviceDisplayApp.tsx +++ b/app/src/App/OnDeviceDisplayApp.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect, useState, useCallback } from 'react' import { useDispatch, useSelector } from 'react-redux' import { Routes, Route, Navigate, useLocation } from 'react-router-dom' import { css } from 'styled-components' @@ -163,7 +163,7 @@ export const OnDeviceDisplayApp = (): JSX.Element => { const dispatch = useDispatch() const isIdle = useIdle(sleepTime, options) - React.useEffect(() => { + useEffect(() => { if (isIdle) { dispatch(updateBrightness(TURN_OFF_BACKLIGHT)) } else { @@ -220,13 +220,13 @@ const getTargetPath = (unfinishedUnboxingFlowRoute: string | null): string => { // split to a separate function because scrollRef rerenders on every route change // this avoids rerendering parent providers as well export function OnDeviceDisplayAppRoutes(): JSX.Element { - const [currentNode, setCurrentNode] = React.useState(null) - const scrollRef = React.useCallback((node: HTMLElement | null) => { + const [currentNode, setCurrentNode] = useState(null) + const scrollRef = useCallback((node: HTMLElement | null) => { setCurrentNode(node) }, []) const isScrolling = useScrolling(currentNode) const location = useLocation() - React.useEffect(() => { + useEffect(() => { currentNode?.scrollTo({ top: 0, left: 0, diff --git a/app/src/App/OnDeviceDisplayAppFallback.tsx b/app/src/App/OnDeviceDisplayAppFallback.tsx index 1e507463445..6077db2d4da 100644 --- a/app/src/App/OnDeviceDisplayAppFallback.tsx +++ b/app/src/App/OnDeviceDisplayAppFallback.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -47,7 +47,7 @@ export function OnDeviceDisplayAppFallback({ } // immediately report to robot logs that something fatal happened - React.useEffect(() => { + useEffect(() => { dispatch(sendLog(`ODD app encountered a fatal error: ${error.message}`)) }, []) diff --git a/app/src/App/__mocks__/portal.tsx b/app/src/App/__mocks__/portal.tsx index 67fd57af2de..f80b1deb44e 100644 --- a/app/src/App/__mocks__/portal.tsx +++ b/app/src/App/__mocks__/portal.tsx @@ -1,5 +1,5 @@ // mock portal for enzyme tests -import * as React from 'react' +import type * as React from 'react' interface Props { children: React.ReactNode diff --git a/app/src/App/__tests__/App.test.tsx b/app/src/App/__tests__/App.test.tsx index cd7a08e1c2c..0f5faf53894 100644 --- a/app/src/App/__tests__/App.test.tsx +++ b/app/src/App/__tests__/App.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, beforeEach, afterEach, expect, it } from 'vitest' import { when } from 'vitest-when' import { screen } from '@testing-library/react' diff --git a/app/src/App/__tests__/DesktopApp.test.tsx b/app/src/App/__tests__/DesktopApp.test.tsx index e43cae4a097..1daf5c7d226 100644 --- a/app/src/App/__tests__/DesktopApp.test.tsx +++ b/app/src/App/__tests__/DesktopApp.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/App/__tests__/Navbar.test.tsx b/app/src/App/__tests__/Navbar.test.tsx index db7eedc744b..508323c739c 100644 --- a/app/src/App/__tests__/Navbar.test.tsx +++ b/app/src/App/__tests__/Navbar.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it } from 'vitest' import { screen, render } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/App/__tests__/OnDeviceDisplayApp.test.tsx b/app/src/App/__tests__/OnDeviceDisplayApp.test.tsx index 5243db5310a..fae54eb2fed 100644 --- a/app/src/App/__tests__/OnDeviceDisplayApp.test.tsx +++ b/app/src/App/__tests__/OnDeviceDisplayApp.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { vi, describe, beforeEach, afterEach, expect, it } from 'vitest' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/App/__tests__/OnDeviceDisplayAppFallback.test.tsx b/app/src/App/__tests__/OnDeviceDisplayAppFallback.test.tsx index d04a0f8df1c..864e714694a 100644 --- a/app/src/App/__tests__/OnDeviceDisplayAppFallback.test.tsx +++ b/app/src/App/__tests__/OnDeviceDisplayAppFallback.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, beforeEach, it, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/App/__tests__/hooks.test.tsx b/app/src/App/__tests__/hooks.test.tsx index 9ce1f5e9160..5b3f315049b 100644 --- a/app/src/App/__tests__/hooks.test.tsx +++ b/app/src/App/__tests__/hooks.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, beforeEach, afterEach, expect, it } from 'vitest' import { renderHook } from '@testing-library/react' import { createStore } from 'redux' diff --git a/app/src/App/hooks.ts b/app/src/App/hooks.ts index dd28b35e964..d01082d8dc1 100644 --- a/app/src/App/hooks.ts +++ b/app/src/App/hooks.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useCallback, useRef, useEffect } from 'react' import difference from 'lodash/difference' import { useTranslation } from 'react-i18next' import { useQueryClient } from 'react-query' @@ -23,7 +23,7 @@ const PROTOCOL_IDS_RECHECK_INTERVAL_MS = 3000 export function useSoftwareUpdatePoll(): void { const dispatch = useDispatch() - const checkAppUpdate = React.useCallback(() => dispatch(checkShellUpdate()), [ + const checkAppUpdate = useCallback(() => dispatch(checkShellUpdate()), [ dispatch, ]) useInterval(checkAppUpdate, UPDATE_RECHECK_INTERVAL_MS) @@ -41,8 +41,8 @@ export function useProtocolReceiptToast(): void { true ) const protocolIds = protocolIdsQuery.data?.data ?? [] - const protocolIdsRef = React.useRef(protocolIds) - const hasRefetched = React.useRef(true) + const protocolIdsRef = useRef(protocolIds) + const hasRefetched = useRef(true) const { createLiveCommand } = useCreateLiveCommandMutation() const animationCommand: SetStatusBarCreateCommand = { commandType: 'setStatusBar', @@ -53,7 +53,7 @@ export function useProtocolReceiptToast(): void { hasRefetched.current = false } - React.useEffect(() => { + useEffect(() => { const newProtocolIds = difference(protocolIds, protocolIdsRef.current) if (!hasRefetched.current && newProtocolIds.length > 0) { Promise.all( diff --git a/app/src/App/index.tsx b/app/src/App/index.tsx index 2e94c63d6f7..f0ba1de0304 100644 --- a/app/src/App/index.tsx +++ b/app/src/App/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { Flex, POSITION_FIXED, DIRECTION_ROW } from '@opentrons/components' diff --git a/app/src/App/portal.tsx b/app/src/App/portal.tsx index 346d5842d81..d9e17199f56 100644 --- a/app/src/App/portal.tsx +++ b/app/src/App/portal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Box } from '@opentrons/components' export const TOP_PORTAL_ID = '__otAppTopPortalRoot' diff --git a/app/src/DesignTokens/BorderRadius/BorderRadius.stories.tsx b/app/src/DesignTokens/BorderRadius/BorderRadius.stories.tsx index 677e26b0c77..29e655c3a11 100644 --- a/app/src/DesignTokens/BorderRadius/BorderRadius.stories.tsx +++ b/app/src/DesignTokens/BorderRadius/BorderRadius.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_FLEX_START, BORDERS, diff --git a/app/src/DesignTokens/Colors/Colors.stories.tsx b/app/src/DesignTokens/Colors/Colors.stories.tsx index 60bbdff3945..98601ccac19 100644 --- a/app/src/DesignTokens/Colors/Colors.stories.tsx +++ b/app/src/DesignTokens/Colors/Colors.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_FLEX_START, BORDERS, diff --git a/app/src/DesignTokens/Spacing/Spacing.stories.tsx b/app/src/DesignTokens/Spacing/Spacing.stories.tsx index 5a0d0d4da81..3b12ae833db 100644 --- a/app/src/DesignTokens/Spacing/Spacing.stories.tsx +++ b/app/src/DesignTokens/Spacing/Spacing.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_FLEX_START, Box, diff --git a/app/src/DesignTokens/Typography/Typography.stories.tsx b/app/src/DesignTokens/Typography/Typography.stories.tsx index ac95fa3a369..787d558bf52 100644 --- a/app/src/DesignTokens/Typography/Typography.stories.tsx +++ b/app/src/DesignTokens/Typography/Typography.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import type { FlattenSimpleInterpolation } from 'styled-components' import { diff --git a/app/src/LocalizationProvider.tsx b/app/src/LocalizationProvider.tsx index 7fbb30d4774..1cd676d2095 100644 --- a/app/src/LocalizationProvider.tsx +++ b/app/src/LocalizationProvider.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { I18nextProvider } from 'react-i18next' import reduce from 'lodash/reduce' diff --git a/app/src/__testing-utils__/renderWithProviders.tsx b/app/src/__testing-utils__/renderWithProviders.tsx index 65a2e01855e..11e3ba16d9b 100644 --- a/app/src/__testing-utils__/renderWithProviders.tsx +++ b/app/src/__testing-utils__/renderWithProviders.tsx @@ -1,6 +1,6 @@ // render using targetted component using @testing-library/react // with wrapping providers for i18next and redux -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { I18nextProvider } from 'react-i18next' import { Provider } from 'react-redux' diff --git a/app/src/atoms/InlineNotification/InlineNotification.stories.tsx b/app/src/atoms/InlineNotification/InlineNotification.stories.tsx index b993fd13205..ff4e4de6999 100644 --- a/app/src/atoms/InlineNotification/InlineNotification.stories.tsx +++ b/app/src/atoms/InlineNotification/InlineNotification.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { VIEWPORT } from '@opentrons/components' import { InlineNotification } from '.' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/atoms/InlineNotification/__tests__/InlineNotification.test.tsx b/app/src/atoms/InlineNotification/__tests__/InlineNotification.test.tsx index a1bdf9b33c2..0e91433e7b2 100644 --- a/app/src/atoms/InlineNotification/__tests__/InlineNotification.test.tsx +++ b/app/src/atoms/InlineNotification/__tests__/InlineNotification.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { screen, fireEvent } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/atoms/InlineNotification/index.tsx b/app/src/atoms/InlineNotification/index.tsx index 1605abd990d..5b5bf21aafa 100644 --- a/app/src/atoms/InlineNotification/index.tsx +++ b/app/src/atoms/InlineNotification/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/atoms/InstrumentContainer/InstrumentContainer.stories.tsx b/app/src/atoms/InstrumentContainer/InstrumentContainer.stories.tsx index 680b104c6b8..d5daeb2d6d7 100644 --- a/app/src/atoms/InstrumentContainer/InstrumentContainer.stories.tsx +++ b/app/src/atoms/InstrumentContainer/InstrumentContainer.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { InstrumentContainer as InstrumentContainerComponent } from './index' diff --git a/app/src/atoms/InstrumentContainer/__tests__/InstrumentContainer.test.tsx b/app/src/atoms/InstrumentContainer/__tests__/InstrumentContainer.test.tsx index d7a6a7d41fd..e5fa872ab54 100644 --- a/app/src/atoms/InstrumentContainer/__tests__/InstrumentContainer.test.tsx +++ b/app/src/atoms/InstrumentContainer/__tests__/InstrumentContainer.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/atoms/InstrumentContainer/index.tsx b/app/src/atoms/InstrumentContainer/index.tsx index 3efb742fa76..475dfed3b23 100644 --- a/app/src/atoms/InstrumentContainer/index.tsx +++ b/app/src/atoms/InstrumentContainer/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { BORDERS, COLORS, diff --git a/app/src/atoms/Link/ExternalLink.stories.tsx b/app/src/atoms/Link/ExternalLink.stories.tsx index 8f664d257f5..d5d2dccaee9 100644 --- a/app/src/atoms/Link/ExternalLink.stories.tsx +++ b/app/src/atoms/Link/ExternalLink.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS, Flex, SPACING } from '@opentrons/components' import { ExternalLink as ExternalLinkComponent } from './ExternalLink' diff --git a/app/src/atoms/Link/ExternalLink.tsx b/app/src/atoms/Link/ExternalLink.tsx index e35e3515277..5d24a06fdb4 100644 --- a/app/src/atoms/Link/ExternalLink.tsx +++ b/app/src/atoms/Link/ExternalLink.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Link, Icon, TYPOGRAPHY, SPACING } from '@opentrons/components' import type { LinkProps } from '@opentrons/components' diff --git a/app/src/atoms/Link/__tests__/ExternalLink.test.tsx b/app/src/atoms/Link/__tests__/ExternalLink.test.tsx index 81c9e8cc6c2..e245541c514 100644 --- a/app/src/atoms/Link/__tests__/ExternalLink.test.tsx +++ b/app/src/atoms/Link/__tests__/ExternalLink.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/app/src/atoms/ProgressBar/__tests__/ProgressBar.test.tsx b/app/src/atoms/ProgressBar/__tests__/ProgressBar.test.tsx index daaf7c70417..6d5b3d3fa40 100644 --- a/app/src/atoms/ProgressBar/__tests__/ProgressBar.test.tsx +++ b/app/src/atoms/ProgressBar/__tests__/ProgressBar.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/ProgressBar/index.tsx b/app/src/atoms/ProgressBar/index.tsx index 01054384094..5852dadf2b5 100644 --- a/app/src/atoms/ProgressBar/index.tsx +++ b/app/src/atoms/ProgressBar/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { COLORS, Box } from '@opentrons/components' diff --git a/app/src/atoms/SelectField/Select.stories.tsx b/app/src/atoms/SelectField/Select.stories.tsx index 2df1ac462fa..461bab59b22 100644 --- a/app/src/atoms/SelectField/Select.stories.tsx +++ b/app/src/atoms/SelectField/Select.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Select } from './Select' diff --git a/app/src/atoms/SelectField/Select.tsx b/app/src/atoms/SelectField/Select.tsx index 2f1a6ef8879..110fbbbf857 100644 --- a/app/src/atoms/SelectField/Select.tsx +++ b/app/src/atoms/SelectField/Select.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import ReactSelect, { components } from 'react-select' import { diff --git a/app/src/atoms/SelectField/index.tsx b/app/src/atoms/SelectField/index.tsx index 36c425cbeae..50deed28266 100644 --- a/app/src/atoms/SelectField/index.tsx +++ b/app/src/atoms/SelectField/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import find from 'lodash/find' import { Select } from './Select' import { diff --git a/app/src/atoms/Skeleton/Skeleton.stories.tsx b/app/src/atoms/Skeleton/Skeleton.stories.tsx index f3c4ab231c4..c91679c1a3a 100644 --- a/app/src/atoms/Skeleton/Skeleton.stories.tsx +++ b/app/src/atoms/Skeleton/Skeleton.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex, DIRECTION_COLUMN, diff --git a/app/src/atoms/Skeleton/__tests__/Skeleton.test.tsx b/app/src/atoms/Skeleton/__tests__/Skeleton.test.tsx index 9e37a85622c..b03bd72e98d 100644 --- a/app/src/atoms/Skeleton/__tests__/Skeleton.test.tsx +++ b/app/src/atoms/Skeleton/__tests__/Skeleton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/Skeleton/index.tsx b/app/src/atoms/Skeleton/index.tsx index 556a5653a77..3c9ccb09a7b 100644 --- a/app/src/atoms/Skeleton/index.tsx +++ b/app/src/atoms/Skeleton/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { BORDERS, Box, COLORS } from '@opentrons/components' diff --git a/app/src/atoms/SleepScreen/__tests__/SleepScreen.test.tsx b/app/src/atoms/SleepScreen/__tests__/SleepScreen.test.tsx index a1862f37db0..79356e879e0 100644 --- a/app/src/atoms/SleepScreen/__tests__/SleepScreen.test.tsx +++ b/app/src/atoms/SleepScreen/__tests__/SleepScreen.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/SleepScreen/index.tsx b/app/src/atoms/SleepScreen/index.tsx index 2600f9d2de9..64ff2ff7cbe 100644 --- a/app/src/atoms/SleepScreen/index.tsx +++ b/app/src/atoms/SleepScreen/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Flex, COLORS } from '@opentrons/components' export function SleepScreen(): JSX.Element { diff --git a/app/src/atoms/Slideout/MultiSlideout.tsx b/app/src/atoms/Slideout/MultiSlideout.tsx index 73054a10a45..65865edec53 100644 --- a/app/src/atoms/Slideout/MultiSlideout.tsx +++ b/app/src/atoms/Slideout/MultiSlideout.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Slideout } from './index' import type { MultiSlideoutSpecs, SlideoutProps } from './index' diff --git a/app/src/atoms/Slideout/Slideout.stories.tsx b/app/src/atoms/Slideout/Slideout.stories.tsx index 6d1b828573c..9cee5939d15 100644 --- a/app/src/atoms/Slideout/Slideout.stories.tsx +++ b/app/src/atoms/Slideout/Slideout.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { action } from '@storybook/addon-actions' import { COLORS, @@ -24,7 +24,7 @@ export default meta type Story = StoryObj const Children = ( - + - + ) export const Slideout: Story = { diff --git a/app/src/atoms/Slideout/__tests__/Slideout.test.tsx b/app/src/atoms/Slideout/__tests__/Slideout.test.tsx index bd30ce3f578..8e3301ad374 100644 --- a/app/src/atoms/Slideout/__tests__/Slideout.test.tsx +++ b/app/src/atoms/Slideout/__tests__/Slideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen, fireEvent } from '@testing-library/react' diff --git a/app/src/atoms/SoftwareKeyboard/AlphanumericKeyboard/AlphanumericKeyboard.stories.tsx b/app/src/atoms/SoftwareKeyboard/AlphanumericKeyboard/AlphanumericKeyboard.stories.tsx index dac73384226..5d00c0ac298 100644 --- a/app/src/atoms/SoftwareKeyboard/AlphanumericKeyboard/AlphanumericKeyboard.stories.tsx +++ b/app/src/atoms/SoftwareKeyboard/AlphanumericKeyboard/AlphanumericKeyboard.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useRef } from 'react' import { DIRECTION_COLUMN, Flex, @@ -22,9 +22,9 @@ export default meta type Story = StoryObj const Keyboard = (): JSX.Element => { - const [showKeyboard, setShowKeyboard] = React.useState(false) - const [value, setValue] = React.useState('') - const keyboardRef = React.useRef(null) + const [showKeyboard, setShowKeyboard] = useState(false) + const [value, setValue] = useState('') + const keyboardRef = useRef(null) return (
diff --git a/app/src/atoms/SoftwareKeyboard/FullKeyboard/FullKeyboard.stories.tsx b/app/src/atoms/SoftwareKeyboard/FullKeyboard/FullKeyboard.stories.tsx index 3734a895231..27d79e602f8 100644 --- a/app/src/atoms/SoftwareKeyboard/FullKeyboard/FullKeyboard.stories.tsx +++ b/app/src/atoms/SoftwareKeyboard/FullKeyboard/FullKeyboard.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useRef } from 'react' import { DIRECTION_COLUMN, Flex, @@ -21,9 +21,9 @@ export default meta type Story = StoryObj const Keyboard = (): JSX.Element => { - const [showKeyboard, setShowKeyboard] = React.useState(false) - const [value, setValue] = React.useState('') - const keyboardRef = React.useRef(null) + const [showKeyboard, setShowKeyboard] = useState(false) + const [value, setValue] = useState('') + const keyboardRef = useRef(null) return ( diff --git a/app/src/atoms/SoftwareKeyboard/IndividualKey/IndividualKey.stories.tsx b/app/src/atoms/SoftwareKeyboard/IndividualKey/IndividualKey.stories.tsx index 18978b2318f..e19ee9ecc57 100644 --- a/app/src/atoms/SoftwareKeyboard/IndividualKey/IndividualKey.stories.tsx +++ b/app/src/atoms/SoftwareKeyboard/IndividualKey/IndividualKey.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useRef } from 'react' import { DIRECTION_COLUMN, Flex, @@ -22,9 +22,9 @@ export default meta type Story = StoryObj const Keyboard = ({ ...args }): JSX.Element => { - const [showKeyboard, setShowKeyboard] = React.useState(false) - const [value, setValue] = React.useState('') - const keyboardRef = React.useRef(null) + const [showKeyboard, setShowKeyboard] = useState(false) + const [value, setValue] = useState('') + const keyboardRef = useRef(null) return ( diff --git a/app/src/atoms/SoftwareKeyboard/IndividualKey/index.tsx b/app/src/atoms/SoftwareKeyboard/IndividualKey/index.tsx index 310008cddc8..1ba1ec5e150 100644 --- a/app/src/atoms/SoftwareKeyboard/IndividualKey/index.tsx +++ b/app/src/atoms/SoftwareKeyboard/IndividualKey/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { KeyboardReact as Keyboard } from 'react-simple-keyboard' import type { KeyboardReactInterface } from 'react-simple-keyboard' import '../index.css' diff --git a/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/NumericalKeyboard.stories.tsx b/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/NumericalKeyboard.stories.tsx index 22bca18ca66..216aaac86c5 100644 --- a/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/NumericalKeyboard.stories.tsx +++ b/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/NumericalKeyboard.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useRef } from 'react' import { DIRECTION_COLUMN, Flex, @@ -37,9 +37,9 @@ type Story = StoryObj const Keyboard = (args): JSX.Element => { const { isDecimal, hasHyphen } = args - const [showKeyboard, setShowKeyboard] = React.useState(false) - const [value, setValue] = React.useState('') - const keyboardRef = React.useRef(null) + const [showKeyboard, setShowKeyboard] = useState(false) + const [value, setValue] = useState('') + const keyboardRef = useRef(null) return ( diff --git a/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/index.tsx b/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/index.tsx index 7bb9a73e105..f0025b6c972 100644 --- a/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/index.tsx +++ b/app/src/atoms/SoftwareKeyboard/NumericalKeyboard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { KeyboardReact as Keyboard } from 'react-simple-keyboard' import { numericalKeyboardLayout, numericalCustom } from '../constants' diff --git a/app/src/atoms/StatusLabel/StatusLabel.stories.tsx b/app/src/atoms/StatusLabel/StatusLabel.stories.tsx index 0be5f54b519..e4ef9485fbf 100644 --- a/app/src/atoms/StatusLabel/StatusLabel.stories.tsx +++ b/app/src/atoms/StatusLabel/StatusLabel.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { COLORS } from '@opentrons/components' import { StatusLabel } from './index' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/atoms/StatusLabel/__tests__/StatusLabel.test.tsx b/app/src/atoms/StatusLabel/__tests__/StatusLabel.test.tsx index 8c7f200d90d..568326f0065 100644 --- a/app/src/atoms/StatusLabel/__tests__/StatusLabel.test.tsx +++ b/app/src/atoms/StatusLabel/__tests__/StatusLabel.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/StatusLabel/index.tsx b/app/src/atoms/StatusLabel/index.tsx index a1561e5e75d..0cf2af6e384 100644 --- a/app/src/atoms/StatusLabel/index.tsx +++ b/app/src/atoms/StatusLabel/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import capitalize from 'lodash/capitalize' import { diff --git a/app/src/atoms/StepMeter/StepMeter.stories.tsx b/app/src/atoms/StepMeter/StepMeter.stories.tsx index 44fdf79c43f..1491451794b 100644 --- a/app/src/atoms/StepMeter/StepMeter.stories.tsx +++ b/app/src/atoms/StepMeter/StepMeter.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { StepMeter } from './index' diff --git a/app/src/atoms/StepMeter/__tests__/StepMeter.test.tsx b/app/src/atoms/StepMeter/__tests__/StepMeter.test.tsx index 6e8225f738e..90f027b0f7a 100644 --- a/app/src/atoms/StepMeter/__tests__/StepMeter.test.tsx +++ b/app/src/atoms/StepMeter/__tests__/StepMeter.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/StepMeter/index.tsx b/app/src/atoms/StepMeter/index.tsx index 2c2854dc4d6..371e92b9393 100644 --- a/app/src/atoms/StepMeter/index.tsx +++ b/app/src/atoms/StepMeter/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { css } from 'styled-components' import { Box, @@ -16,7 +16,7 @@ interface StepMeterProps { export const StepMeter = (props: StepMeterProps): JSX.Element => { const { totalSteps, currentStep } = props - const prevPercentComplete = React.useRef(0) + const prevPercentComplete = useRef(0) const progress = currentStep != null ? currentStep : 0 const percentComplete = // this logic puts a cap at 100% percentComplete which we should never run into diff --git a/app/src/atoms/buttons/BackButton.tsx b/app/src/atoms/buttons/BackButton.tsx index 05df2fd800b..29657e1f1b2 100644 --- a/app/src/atoms/buttons/BackButton.tsx +++ b/app/src/atoms/buttons/BackButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/atoms/buttons/FloatingActionButton.stories.tsx b/app/src/atoms/buttons/FloatingActionButton.stories.tsx index a7526805a20..31e5402c13f 100644 --- a/app/src/atoms/buttons/FloatingActionButton.stories.tsx +++ b/app/src/atoms/buttons/FloatingActionButton.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ICON_DATA_BY_NAME, VIEWPORT } from '@opentrons/components' import { FloatingActionButton } from './' diff --git a/app/src/atoms/buttons/FloatingActionButton.tsx b/app/src/atoms/buttons/FloatingActionButton.tsx index 76a72cd076b..b7e870eab16 100644 --- a/app/src/atoms/buttons/FloatingActionButton.tsx +++ b/app/src/atoms/buttons/FloatingActionButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/atoms/buttons/IconButton.tsx b/app/src/atoms/buttons/IconButton.tsx index d86324ed843..ee754472ff1 100644 --- a/app/src/atoms/buttons/IconButton.tsx +++ b/app/src/atoms/buttons/IconButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { BORDERS, diff --git a/app/src/atoms/buttons/MediumButton.tsx b/app/src/atoms/buttons/MediumButton.tsx index b25ac0432b9..d784029696a 100644 --- a/app/src/atoms/buttons/MediumButton.tsx +++ b/app/src/atoms/buttons/MediumButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/atoms/buttons/SmallButton.tsx b/app/src/atoms/buttons/SmallButton.tsx index a177be5a3e0..e659d52fd58 100644 --- a/app/src/atoms/buttons/SmallButton.tsx +++ b/app/src/atoms/buttons/SmallButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/atoms/buttons/SubmitPrimaryButton.tsx b/app/src/atoms/buttons/SubmitPrimaryButton.tsx index 246ec6f9051..cdbf3442a65 100644 --- a/app/src/atoms/buttons/SubmitPrimaryButton.tsx +++ b/app/src/atoms/buttons/SubmitPrimaryButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { SPACING, diff --git a/app/src/atoms/buttons/TextOnlyButton.tsx b/app/src/atoms/buttons/TextOnlyButton.tsx index 45174218cd9..de3bbc969ab 100644 --- a/app/src/atoms/buttons/TextOnlyButton.tsx +++ b/app/src/atoms/buttons/TextOnlyButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Btn, StyledText, COLORS, RESPONSIVENESS } from '@opentrons/components' import type { StyleProps } from '@opentrons/components' import { css } from 'styled-components' diff --git a/app/src/atoms/buttons/ToggleButton.tsx b/app/src/atoms/buttons/ToggleButton.tsx index 5299e332845..b814f45da1d 100644 --- a/app/src/atoms/buttons/ToggleButton.tsx +++ b/app/src/atoms/buttons/ToggleButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Btn, Icon, COLORS, SIZE_1, SIZE_2 } from '@opentrons/components' diff --git a/app/src/atoms/buttons/__tests__/BackButton.test.tsx b/app/src/atoms/buttons/__tests__/BackButton.test.tsx index 6dbe655194a..510abd0ee7d 100644 --- a/app/src/atoms/buttons/__tests__/BackButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/BackButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/atoms/buttons/__tests__/FloatingActionButton.test.tsx b/app/src/atoms/buttons/__tests__/FloatingActionButton.test.tsx index 61e147e2542..de2bcd49e24 100644 --- a/app/src/atoms/buttons/__tests__/FloatingActionButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/FloatingActionButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/buttons/__tests__/MediumButton.test.tsx b/app/src/atoms/buttons/__tests__/MediumButton.test.tsx index 182c0d80a9c..988248413d9 100644 --- a/app/src/atoms/buttons/__tests__/MediumButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/MediumButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/atoms/buttons/__tests__/QuaternaryButton.test.tsx b/app/src/atoms/buttons/__tests__/QuaternaryButton.test.tsx index be8759b1a98..4e10831c73c 100644 --- a/app/src/atoms/buttons/__tests__/QuaternaryButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/QuaternaryButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, beforeEach, vi } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/buttons/__tests__/SmallButton.test.tsx b/app/src/atoms/buttons/__tests__/SmallButton.test.tsx index e39d6f1e850..283f21daf4e 100644 --- a/app/src/atoms/buttons/__tests__/SmallButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/SmallButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/atoms/buttons/__tests__/SubmitPrimaryButton.test.tsx b/app/src/atoms/buttons/__tests__/SubmitPrimaryButton.test.tsx index 455e0026cb3..a62ba9c4a95 100644 --- a/app/src/atoms/buttons/__tests__/SubmitPrimaryButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/SubmitPrimaryButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/atoms/buttons/__tests__/TertiaryButton.test.tsx b/app/src/atoms/buttons/__tests__/TertiaryButton.test.tsx index 7d653b37881..4a3f95369c8 100644 --- a/app/src/atoms/buttons/__tests__/TertiaryButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/TertiaryButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/atoms/buttons/__tests__/ToggleButton.test.tsx b/app/src/atoms/buttons/__tests__/ToggleButton.test.tsx index 23f75531d74..3f61d43c5d0 100644 --- a/app/src/atoms/buttons/__tests__/ToggleButton.test.tsx +++ b/app/src/atoms/buttons/__tests__/ToggleButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { screen, fireEvent } from '@testing-library/react' import { COLORS, SIZE_2 } from '@opentrons/components' diff --git a/app/src/atoms/structure/Divider.stories.tsx b/app/src/atoms/structure/Divider.stories.tsx index b38372a575c..747c21bec09 100644 --- a/app/src/atoms/structure/Divider.stories.tsx +++ b/app/src/atoms/structure/Divider.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_CENTER, Box, diff --git a/app/src/atoms/structure/Divider.tsx b/app/src/atoms/structure/Divider.tsx index 2f8eef69cfc..45bcd932229 100644 --- a/app/src/atoms/structure/Divider.tsx +++ b/app/src/atoms/structure/Divider.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box, COLORS, SPACING } from '@opentrons/components' type Props = React.ComponentProps diff --git a/app/src/atoms/structure/Line.stories.tsx b/app/src/atoms/structure/Line.stories.tsx index 4a37a6ee4f5..0383e5e64a2 100644 --- a/app/src/atoms/structure/Line.stories.tsx +++ b/app/src/atoms/structure/Line.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_CENTER, Box, diff --git a/app/src/atoms/structure/Line.tsx b/app/src/atoms/structure/Line.tsx index 59f0de712bf..ecbbecc24cd 100644 --- a/app/src/atoms/structure/Line.tsx +++ b/app/src/atoms/structure/Line.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box, BORDERS } from '@opentrons/components' type Props = React.ComponentProps diff --git a/app/src/atoms/structure/__tests__/Divider.test.tsx b/app/src/atoms/structure/__tests__/Divider.test.tsx index 4ee70071ccd..27460be938d 100644 --- a/app/src/atoms/structure/__tests__/Divider.test.tsx +++ b/app/src/atoms/structure/__tests__/Divider.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/atoms/structure/__tests__/Line.test.tsx b/app/src/atoms/structure/__tests__/Line.test.tsx index 66f995b768f..d9a9caefba2 100644 --- a/app/src/atoms/structure/__tests__/Line.test.tsx +++ b/app/src/atoms/structure/__tests__/Line.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/index.tsx b/app/src/index.tsx index cf4fcbfc44c..9640ffbd7ad 100644 --- a/app/src/index.tsx +++ b/app/src/index.tsx @@ -1,5 +1,4 @@ // client entry point and application manifest -import React from 'react' import ReactDom from 'react-dom/client' import { Provider } from 'react-redux' import { HashRouter } from 'react-router-dom' diff --git a/app/src/molecules/BackgroundOverlay/__tests__/BackgroundOverlay.test.tsx b/app/src/molecules/BackgroundOverlay/__tests__/BackgroundOverlay.test.tsx index 73648cd15b8..e09b3c11765 100644 --- a/app/src/molecules/BackgroundOverlay/__tests__/BackgroundOverlay.test.tsx +++ b/app/src/molecules/BackgroundOverlay/__tests__/BackgroundOverlay.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/molecules/BackgroundOverlay/index.tsx b/app/src/molecules/BackgroundOverlay/index.tsx index ccfdb273fc4..3d6c6d976c6 100644 --- a/app/src/molecules/BackgroundOverlay/index.tsx +++ b/app/src/molecules/BackgroundOverlay/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { COLORS, Flex, POSITION_FIXED } from '@opentrons/components' diff --git a/app/src/molecules/CardButton/CardButton.stories.tsx b/app/src/molecules/CardButton/CardButton.stories.tsx index 67256590b4b..3d80e18a3bb 100644 --- a/app/src/molecules/CardButton/CardButton.stories.tsx +++ b/app/src/molecules/CardButton/CardButton.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex, ICON_DATA_BY_NAME, diff --git a/app/src/molecules/CardButton/__tests__/CardButton.test.tsx b/app/src/molecules/CardButton/__tests__/CardButton.test.tsx index ceff9582c21..820dfbdc4e9 100644 --- a/app/src/molecules/CardButton/__tests__/CardButton.test.tsx +++ b/app/src/molecules/CardButton/__tests__/CardButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/molecules/CardButton/index.tsx b/app/src/molecules/CardButton/index.tsx index 2b8a6293198..86ed6e3731a 100644 --- a/app/src/molecules/CardButton/index.tsx +++ b/app/src/molecules/CardButton/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useNavigate } from 'react-router-dom' import { css } from 'styled-components' import { diff --git a/app/src/molecules/CollapsibleSection/__tests__/CollapsibleSection.test.tsx b/app/src/molecules/CollapsibleSection/__tests__/CollapsibleSection.test.tsx index 2a444b25a65..3acef8b4a29 100644 --- a/app/src/molecules/CollapsibleSection/__tests__/CollapsibleSection.test.tsx +++ b/app/src/molecules/CollapsibleSection/__tests__/CollapsibleSection.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, expect } from 'vitest' import { fireEvent, render, screen } from '@testing-library/react' diff --git a/app/src/molecules/Command/Command.stories.tsx b/app/src/molecules/Command/Command.stories.tsx index 6cba996f21a..1fe64215ef3 100644 --- a/app/src/molecules/Command/Command.stories.tsx +++ b/app/src/molecules/Command/Command.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Command as CommandComponent } from '.' import type { CommandState } from './Command' import * as Fixtures from './__fixtures__' diff --git a/app/src/molecules/Command/Command.tsx b/app/src/molecules/Command/Command.tsx index cf7e5ce0d92..32d95a33371 100644 --- a/app/src/molecules/Command/Command.tsx +++ b/app/src/molecules/Command/Command.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex, JUSTIFY_CENTER, diff --git a/app/src/molecules/Command/CommandIcon.stories.tsx b/app/src/molecules/Command/CommandIcon.stories.tsx index 4312d585554..4452a67cefb 100644 --- a/app/src/molecules/Command/CommandIcon.stories.tsx +++ b/app/src/molecules/Command/CommandIcon.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { CommandIcon as CommandIconComponent } from './CommandIcon' import type { ICON_BY_COMMAND_TYPE } from './CommandIcon' diff --git a/app/src/molecules/Command/CommandIcon.tsx b/app/src/molecules/Command/CommandIcon.tsx index 77eb4ef3914..4002de50973 100644 --- a/app/src/molecules/Command/CommandIcon.tsx +++ b/app/src/molecules/Command/CommandIcon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from '@opentrons/components' import type { IconName, StyleProps } from '@opentrons/components' import type { RunTimeCommand } from '@opentrons/shared-data' diff --git a/app/src/molecules/Command/CommandIndex.tsx b/app/src/molecules/Command/CommandIndex.tsx index bcabae9ef90..6357d372486 100644 --- a/app/src/molecules/Command/CommandIndex.tsx +++ b/app/src/molecules/Command/CommandIndex.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { StyledText, RESPONSIVENESS, diff --git a/app/src/molecules/Command/CommandText.stories.tsx b/app/src/molecules/Command/CommandText.stories.tsx index fa361be59dc..f6b40e0a4e4 100644 --- a/app/src/molecules/Command/CommandText.stories.tsx +++ b/app/src/molecules/Command/CommandText.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Box } from '@opentrons/components' import { CommandText as CommandTextComponent } from '.' import type { RobotType } from '@opentrons/shared-data' diff --git a/app/src/molecules/Command/CommandText.tsx b/app/src/molecules/Command/CommandText.tsx index 75b12733eca..70fb5281817 100644 --- a/app/src/molecules/Command/CommandText.tsx +++ b/app/src/molecules/Command/CommandText.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { pick } from 'lodash' import { diff --git a/app/src/molecules/Command/__tests__/CommandText.test.tsx b/app/src/molecules/Command/__tests__/CommandText.test.tsx index 484c9ee0323..7425c2e1853 100644 --- a/app/src/molecules/Command/__tests__/CommandText.test.tsx +++ b/app/src/molecules/Command/__tests__/CommandText.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { it, expect, describe } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/molecules/FileUpload/FileUpload.stories.tsx b/app/src/molecules/FileUpload/FileUpload.stories.tsx index 5ddaab2698f..855a50c5629 100644 --- a/app/src/molecules/FileUpload/FileUpload.stories.tsx +++ b/app/src/molecules/FileUpload/FileUpload.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import testFile from './__tests__/test-file.png' import { FileUpload } from '.' diff --git a/app/src/molecules/FileUpload/__tests__/FileUpload.test.tsx b/app/src/molecules/FileUpload/__tests__/FileUpload.test.tsx index 4e18cdfb08a..cd5b5adfd82 100644 --- a/app/src/molecules/FileUpload/__tests__/FileUpload.test.tsx +++ b/app/src/molecules/FileUpload/__tests__/FileUpload.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { beforeEach, describe, expect, it, vi } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/molecules/FileUpload/index.tsx b/app/src/molecules/FileUpload/index.tsx index dc953027235..777d186ccb0 100644 --- a/app/src/molecules/FileUpload/index.tsx +++ b/app/src/molecules/FileUpload/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/molecules/GenericWizardTile/GenericWizardTile.stories.tsx b/app/src/molecules/GenericWizardTile/GenericWizardTile.stories.tsx index b707286cb55..5444feff20b 100644 --- a/app/src/molecules/GenericWizardTile/GenericWizardTile.stories.tsx +++ b/app/src/molecules/GenericWizardTile/GenericWizardTile.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import { diff --git a/app/src/molecules/GenericWizardTile/__tests__/GenericWizardTile.test.tsx b/app/src/molecules/GenericWizardTile/__tests__/GenericWizardTile.test.tsx index 8070a4d3cd7..1f53800ff6d 100644 --- a/app/src/molecules/GenericWizardTile/__tests__/GenericWizardTile.test.tsx +++ b/app/src/molecules/GenericWizardTile/__tests__/GenericWizardTile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/molecules/GenericWizardTile/index.tsx b/app/src/molecules/GenericWizardTile/index.tsx index 1d07d2bb9ea..4bda416cca5 100644 --- a/app/src/molecules/GenericWizardTile/index.tsx +++ b/app/src/molecules/GenericWizardTile/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import styled, { css } from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/app/src/molecules/InProgressModal/InProgressModal.stories.tsx b/app/src/molecules/InProgressModal/InProgressModal.stories.tsx index 9fc5f5b30c9..cfa241a95fc 100644 --- a/app/src/molecules/InProgressModal/InProgressModal.stories.tsx +++ b/app/src/molecules/InProgressModal/InProgressModal.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import type { Meta, StoryObj } from '@storybook/react' import { InProgressModal as InProgressModalComponent } from './' import { SimpleWizardInProgressBody } from '../SimpleWizardBody' diff --git a/app/src/molecules/InProgressModal/InProgressModal.tsx b/app/src/molecules/InProgressModal/InProgressModal.tsx index 24c5d9a8f71..c6fefe761a2 100644 --- a/app/src/molecules/InProgressModal/InProgressModal.tsx +++ b/app/src/molecules/InProgressModal/InProgressModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/molecules/InProgressModal/__tests__/InProgressModal.test.tsx b/app/src/molecules/InProgressModal/__tests__/InProgressModal.test.tsx index 9d0f0874874..f670fa221c3 100644 --- a/app/src/molecules/InProgressModal/__tests__/InProgressModal.test.tsx +++ b/app/src/molecules/InProgressModal/__tests__/InProgressModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/molecules/InfoMessage/__tests__/InfoMessage.test.tsx b/app/src/molecules/InfoMessage/__tests__/InfoMessage.test.tsx index c4327de590b..5ff6948976f 100644 --- a/app/src/molecules/InfoMessage/__tests__/InfoMessage.test.tsx +++ b/app/src/molecules/InfoMessage/__tests__/InfoMessage.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' import { screen } from '@testing-library/react' diff --git a/app/src/molecules/InfoMessage/index.tsx b/app/src/molecules/InfoMessage/index.tsx index 618233b0a20..c5d8bda1666 100644 --- a/app/src/molecules/InfoMessage/index.tsx +++ b/app/src/molecules/InfoMessage/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_CENTER, ALIGN_FLEX_START, diff --git a/app/src/molecules/InstrumentCard/InstrumentCard.stories.tsx b/app/src/molecules/InstrumentCard/InstrumentCard.stories.tsx index 7a56a1eba9c..7db21c46afc 100644 --- a/app/src/molecules/InstrumentCard/InstrumentCard.stories.tsx +++ b/app/src/molecules/InstrumentCard/InstrumentCard.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { InstrumentCard } from './' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/molecules/InstrumentCard/__tests__/InstrumentCard.test.tsx b/app/src/molecules/InstrumentCard/__tests__/InstrumentCard.test.tsx index 6efa70a7752..ca5905829f0 100644 --- a/app/src/molecules/InstrumentCard/__tests__/InstrumentCard.test.tsx +++ b/app/src/molecules/InstrumentCard/__tests__/InstrumentCard.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, render, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi } from 'vitest' diff --git a/app/src/molecules/InstrumentCard/index.tsx b/app/src/molecules/InstrumentCard/index.tsx index 4384db759e3..bcb2ccb47ac 100644 --- a/app/src/molecules/InstrumentCard/index.tsx +++ b/app/src/molecules/InstrumentCard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ALIGN_CENTER, diff --git a/app/src/molecules/InterventionModal/CategorizedStepContent.stories.tsx b/app/src/molecules/InterventionModal/CategorizedStepContent.stories.tsx index 4037532cf6f..04c04c0f3c6 100644 --- a/app/src/molecules/InterventionModal/CategorizedStepContent.stories.tsx +++ b/app/src/molecules/InterventionModal/CategorizedStepContent.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { CategorizedStepContent, TwoColumn } from '.' diff --git a/app/src/molecules/InterventionModal/CategorizedStepContent.tsx b/app/src/molecules/InterventionModal/CategorizedStepContent.tsx index a9ec14b6876..f0b78a256af 100644 --- a/app/src/molecules/InterventionModal/CategorizedStepContent.tsx +++ b/app/src/molecules/InterventionModal/CategorizedStepContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { Command, CommandIndex } from '../Command' import type { NonSkeletonCommandState, CommandTextData } from '../Command' diff --git a/app/src/molecules/InterventionModal/DeckMapContent.stories.tsx b/app/src/molecules/InterventionModal/DeckMapContent.stories.tsx index 56c896655e0..a41339004e4 100644 --- a/app/src/molecules/InterventionModal/DeckMapContent.stories.tsx +++ b/app/src/molecules/InterventionModal/DeckMapContent.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { DeckMapContent } from '.' diff --git a/app/src/molecules/InterventionModal/DescriptionContent.tsx b/app/src/molecules/InterventionModal/DescriptionContent.tsx index 8f166ad79c6..a3da661da0e 100644 --- a/app/src/molecules/InterventionModal/DescriptionContent.tsx +++ b/app/src/molecules/InterventionModal/DescriptionContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex, SPACING, diff --git a/app/src/molecules/InterventionModal/InterventionContent/InterventionContent.stories.tsx b/app/src/molecules/InterventionModal/InterventionContent/InterventionContent.stories.tsx index d910847c2d3..47cfea68317 100644 --- a/app/src/molecules/InterventionModal/InterventionContent/InterventionContent.stories.tsx +++ b/app/src/molecules/InterventionModal/InterventionContent/InterventionContent.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ICON_DATA_BY_NAME } from '@opentrons/components' import { InterventionContent } from '.' import { TwoColumn } from '../TwoColumn' diff --git a/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.stories.tsx b/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.stories.tsx index caac9a06d5c..33a6ddbcac1 100644 --- a/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.stories.tsx +++ b/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.stories.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Box, ICON_DATA_BY_NAME } from '@opentrons/components' import { InterventionInfo } from './InterventionInfo' diff --git a/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.tsx b/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.tsx index f24efb492be..03435fb48b5 100644 --- a/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.tsx +++ b/app/src/molecules/InterventionModal/InterventionContent/InterventionInfo.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/molecules/InterventionModal/InterventionContent/index.tsx b/app/src/molecules/InterventionModal/InterventionContent/index.tsx index 63e1e33e2c6..8d2bbba9c8c 100644 --- a/app/src/molecules/InterventionModal/InterventionContent/index.tsx +++ b/app/src/molecules/InterventionModal/InterventionContent/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Flex, StyledText, diff --git a/app/src/molecules/InterventionModal/InterventionModal.stories.tsx b/app/src/molecules/InterventionModal/InterventionModal.stories.tsx index 63f2827cc1e..75b025faaf7 100644 --- a/app/src/molecules/InterventionModal/InterventionModal.stories.tsx +++ b/app/src/molecules/InterventionModal/InterventionModal.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' diff --git a/app/src/molecules/InterventionModal/ModalContentMixed.tsx b/app/src/molecules/InterventionModal/ModalContentMixed.tsx index 08c5787b1db..4c41003c3d8 100644 --- a/app/src/molecules/InterventionModal/ModalContentMixed.tsx +++ b/app/src/molecules/InterventionModal/ModalContentMixed.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon, Flex, diff --git a/app/src/molecules/InterventionModal/ModalContentOneColSimpleButtons.stories.tsx b/app/src/molecules/InterventionModal/ModalContentOneColSimpleButtons.stories.tsx index 731024ef5e2..626b6bf5243 100644 --- a/app/src/molecules/InterventionModal/ModalContentOneColSimpleButtons.stories.tsx +++ b/app/src/molecules/InterventionModal/ModalContentOneColSimpleButtons.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ModalContentOneColSimpleButtons as ModalContentOneColSimpleButtonsComponent } from './ModalContentOneColSimpleButtons' import type { Meta, StoryObj } from '@storybook/react' diff --git a/app/src/molecules/InterventionModal/OneColumn.stories.tsx b/app/src/molecules/InterventionModal/OneColumn.stories.tsx index ef4e8a6a02f..156eb44b514 100644 --- a/app/src/molecules/InterventionModal/OneColumn.stories.tsx +++ b/app/src/molecules/InterventionModal/OneColumn.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box, RESPONSIVENESS } from '@opentrons/components' diff --git a/app/src/molecules/InterventionModal/OneColumn.tsx b/app/src/molecules/InterventionModal/OneColumn.tsx index e92f3ffd51e..35a37dd10f9 100644 --- a/app/src/molecules/InterventionModal/OneColumn.tsx +++ b/app/src/molecules/InterventionModal/OneColumn.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Flex, diff --git a/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.stories.tsx b/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.stories.tsx index 791edcbdb83..95e9ac3ff98 100644 --- a/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.stories.tsx +++ b/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { OneColumnOrTwoColumn } from './' diff --git a/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.tsx b/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.tsx index 8a6455d67e3..db25d343be5 100644 --- a/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.tsx +++ b/app/src/molecules/InterventionModal/OneColumnOrTwoColumn.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/molecules/InterventionModal/TwoColumn.stories.tsx b/app/src/molecules/InterventionModal/TwoColumn.stories.tsx index a43bfb13068..a1d83ca750d 100644 --- a/app/src/molecules/InterventionModal/TwoColumn.stories.tsx +++ b/app/src/molecules/InterventionModal/TwoColumn.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import SuccessIcon from '/app/assets/images/icon_success.png' diff --git a/app/src/molecules/InterventionModal/TwoColumn.tsx b/app/src/molecules/InterventionModal/TwoColumn.tsx index f0ed10ebf2a..fc9072232be 100644 --- a/app/src/molecules/InterventionModal/TwoColumn.tsx +++ b/app/src/molecules/InterventionModal/TwoColumn.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Flex, Box, DIRECTION_ROW, SPACING, WRAP } from '@opentrons/components' import type { StyleProps } from '@opentrons/components' diff --git a/app/src/molecules/InterventionModal/__tests__/InterventionModal.test.tsx b/app/src/molecules/InterventionModal/__tests__/InterventionModal.test.tsx index 58297e6ec80..a063bee13bc 100644 --- a/app/src/molecules/InterventionModal/__tests__/InterventionModal.test.tsx +++ b/app/src/molecules/InterventionModal/__tests__/InterventionModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { when } from 'vitest-when' import '@testing-library/jest-dom/vitest' diff --git a/app/src/molecules/InterventionModal/__tests__/ModalContentOneColSimpleButtons.test.tsx b/app/src/molecules/InterventionModal/__tests__/ModalContentOneColSimpleButtons.test.tsx index 236b236b390..27a40d82ad4 100644 --- a/app/src/molecules/InterventionModal/__tests__/ModalContentOneColSimpleButtons.test.tsx +++ b/app/src/molecules/InterventionModal/__tests__/ModalContentOneColSimpleButtons.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect } from 'vitest' import { render, screen, fireEvent } from '@testing-library/react' diff --git a/app/src/molecules/InterventionModal/index.tsx b/app/src/molecules/InterventionModal/index.tsx index 3d27946b2f7..a4e0c19c618 100644 --- a/app/src/molecules/InterventionModal/index.tsx +++ b/app/src/molecules/InterventionModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { css } from 'styled-components' diff --git a/app/src/molecules/InterventionModal/story-utils/StandIn.tsx b/app/src/molecules/InterventionModal/story-utils/StandIn.tsx index 0fb46f44b8c..33eb868816d 100644 --- a/app/src/molecules/InterventionModal/story-utils/StandIn.tsx +++ b/app/src/molecules/InterventionModal/story-utils/StandIn.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box, BORDERS } from '@opentrons/components' export function StandInContent({ diff --git a/app/src/molecules/InterventionModal/story-utils/VisibleContainer.tsx b/app/src/molecules/InterventionModal/story-utils/VisibleContainer.tsx index b716b3335ee..8701f074c8a 100644 --- a/app/src/molecules/InterventionModal/story-utils/VisibleContainer.tsx +++ b/app/src/molecules/InterventionModal/story-utils/VisibleContainer.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Box, BORDERS, SPACING } from '@opentrons/components' import type { StyleProps } from '@opentrons/components' diff --git a/app/src/molecules/JogControls/ControlContainer.tsx b/app/src/molecules/JogControls/ControlContainer.tsx index 6d47b3df405..02e3c0b1692 100644 --- a/app/src/molecules/JogControls/ControlContainer.tsx +++ b/app/src/molecules/JogControls/ControlContainer.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { BORDERS, diff --git a/app/src/molecules/JogControls/JogControls.stories.tsx b/app/src/molecules/JogControls/JogControls.stories.tsx index a4008ea6256..55b84d51947 100644 --- a/app/src/molecules/JogControls/JogControls.stories.tsx +++ b/app/src/molecules/JogControls/JogControls.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { JogControls } from './index' diff --git a/app/src/molecules/JogControls/StepSizeControl.tsx b/app/src/molecules/JogControls/StepSizeControl.tsx index 69e290677b3..77d1e65b870 100644 --- a/app/src/molecules/JogControls/StepSizeControl.tsx +++ b/app/src/molecules/JogControls/StepSizeControl.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { diff --git a/app/src/molecules/LabwareStackModal/LabwareStackModal.tsx b/app/src/molecules/LabwareStackModal/LabwareStackModal.tsx index 49073285a9b..9c6602023a8 100644 --- a/app/src/molecules/LabwareStackModal/LabwareStackModal.tsx +++ b/app/src/molecules/LabwareStackModal/LabwareStackModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { css } from 'styled-components' diff --git a/app/src/molecules/MiniCard/MiniCard.stories.tsx b/app/src/molecules/MiniCard/MiniCard.stories.tsx index ba24854ab4d..8045c567d13 100644 --- a/app/src/molecules/MiniCard/MiniCard.stories.tsx +++ b/app/src/molecules/MiniCard/MiniCard.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ALIGN_CENTER, Box, diff --git a/app/src/molecules/MiniCard/__tests__/MiniCard.test.tsx b/app/src/molecules/MiniCard/__tests__/MiniCard.test.tsx index 93436e0d37e..fcc76f38505 100644 --- a/app/src/molecules/MiniCard/__tests__/MiniCard.test.tsx +++ b/app/src/molecules/MiniCard/__tests__/MiniCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/molecules/MiniCard/index.tsx b/app/src/molecules/MiniCard/index.tsx index 526b2076ef4..b65ccbbb59d 100644 --- a/app/src/molecules/MiniCard/index.tsx +++ b/app/src/molecules/MiniCard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { BORDERS, diff --git a/app/src/molecules/ModuleIcon/ModuleIcon.stories.tsx b/app/src/molecules/ModuleIcon/ModuleIcon.stories.tsx index 06484370bac..002c0971e8f 100644 --- a/app/src/molecules/ModuleIcon/ModuleIcon.stories.tsx +++ b/app/src/molecules/ModuleIcon/ModuleIcon.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { DIRECTION_COLUMN, diff --git a/app/src/molecules/ModuleIcon/__tests__/ModuleIcon.test.tsx b/app/src/molecules/ModuleIcon/__tests__/ModuleIcon.test.tsx index 081d08cd4c3..73c44639e51 100644 --- a/app/src/molecules/ModuleIcon/__tests__/ModuleIcon.test.tsx +++ b/app/src/molecules/ModuleIcon/__tests__/ModuleIcon.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { COLORS, SPACING } from '@opentrons/components' import { describe, it, expect, vi, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/molecules/ModuleIcon/index.tsx b/app/src/molecules/ModuleIcon/index.tsx index ed1ae3bcaa4..671b7b9210c 100644 --- a/app/src/molecules/ModuleIcon/index.tsx +++ b/app/src/molecules/ModuleIcon/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/molecules/ModuleInfo/ModuleInfo.tsx b/app/src/molecules/ModuleInfo/ModuleInfo.tsx index c50b08059f0..3e68079bd5f 100644 --- a/app/src/molecules/ModuleInfo/ModuleInfo.tsx +++ b/app/src/molecules/ModuleInfo/ModuleInfo.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/molecules/ModuleInfo/__tests__/ModuleInfo.test.tsx b/app/src/molecules/ModuleInfo/__tests__/ModuleInfo.test.tsx index 65a76492b81..1d732faeb18 100644 --- a/app/src/molecules/ModuleInfo/__tests__/ModuleInfo.test.tsx +++ b/app/src/molecules/ModuleInfo/__tests__/ModuleInfo.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/molecules/NavTab/NavTab.stories.tsx b/app/src/molecules/NavTab/NavTab.stories.tsx index a9b54818b51..d4847a1ed0f 100644 --- a/app/src/molecules/NavTab/NavTab.stories.tsx +++ b/app/src/molecules/NavTab/NavTab.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { Flex, diff --git a/app/src/molecules/NavTab/__tests__/NavTab.test.tsx b/app/src/molecules/NavTab/__tests__/NavTab.test.tsx index 6345c2fac7d..176c76b60cc 100644 --- a/app/src/molecules/NavTab/__tests__/NavTab.test.tsx +++ b/app/src/molecules/NavTab/__tests__/NavTab.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, beforeEach } from 'vitest' diff --git a/app/src/molecules/NavTab/index.tsx b/app/src/molecules/NavTab/index.tsx index 97d6e4a9f12..e170da56e43 100644 --- a/app/src/molecules/NavTab/index.tsx +++ b/app/src/molecules/NavTab/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled, { css } from 'styled-components' import { NavLink } from 'react-router-dom' diff --git a/app/src/molecules/ODDBackButton/ODDBackButton.stories.tsx b/app/src/molecules/ODDBackButton/ODDBackButton.stories.tsx index 6fad4d7ae4a..32719ce1665 100644 --- a/app/src/molecules/ODDBackButton/ODDBackButton.stories.tsx +++ b/app/src/molecules/ODDBackButton/ODDBackButton.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { VIEWPORT } from '@opentrons/components' import { ODDBackButton } from '.' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/molecules/ODDBackButton/__tests__/ODDBackButton.test.tsx b/app/src/molecules/ODDBackButton/__tests__/ODDBackButton.test.tsx index 5e186acf9cd..2b520279cf8 100644 --- a/app/src/molecules/ODDBackButton/__tests__/ODDBackButton.test.tsx +++ b/app/src/molecules/ODDBackButton/__tests__/ODDBackButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/molecules/ODDBackButton/index.tsx b/app/src/molecules/ODDBackButton/index.tsx index 9dff1968160..396feaa5e19 100644 --- a/app/src/molecules/ODDBackButton/index.tsx +++ b/app/src/molecules/ODDBackButton/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ALIGN_CENTER, diff --git a/app/src/molecules/OddModal/ModalHeader.stories.tsx b/app/src/molecules/OddModal/ModalHeader.stories.tsx index adf9524988e..d6e5d95c598 100644 --- a/app/src/molecules/OddModal/ModalHeader.stories.tsx +++ b/app/src/molecules/OddModal/ModalHeader.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { COLORS, VIEWPORT } from '@opentrons/components' import { OddModalHeader } from './OddModalHeader' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/molecules/OddModal/OddModal.stories.tsx b/app/src/molecules/OddModal/OddModal.stories.tsx index 1ba0914779b..1210ad31005 100644 --- a/app/src/molecules/OddModal/OddModal.stories.tsx +++ b/app/src/molecules/OddModal/OddModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { COLORS, Flex, BORDERS, SPACING, VIEWPORT } from '@opentrons/components' import { OddModal } from './OddModal' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/molecules/OddModal/OddModal.tsx b/app/src/molecules/OddModal/OddModal.tsx index 1f18e3e1fd9..9b32974000c 100644 --- a/app/src/molecules/OddModal/OddModal.tsx +++ b/app/src/molecules/OddModal/OddModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ALIGN_CENTER, BORDERS, diff --git a/app/src/molecules/OddModal/OddModalHeader.tsx b/app/src/molecules/OddModal/OddModalHeader.tsx index cd79d1a81f5..5544a14ecbc 100644 --- a/app/src/molecules/OddModal/OddModalHeader.tsx +++ b/app/src/molecules/OddModal/OddModalHeader.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_CENTER, BORDERS, diff --git a/app/src/molecules/OddModal/SmallModalChildren.stories.tsx b/app/src/molecules/OddModal/SmallModalChildren.stories.tsx index c1889ca718e..a4a0bd9bcc5 100644 --- a/app/src/molecules/OddModal/SmallModalChildren.stories.tsx +++ b/app/src/molecules/OddModal/SmallModalChildren.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { VIEWPORT } from '@opentrons/components' import { SmallModalChildren } from './SmallModalChildren' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/molecules/OddModal/SmallModalChildren.tsx b/app/src/molecules/OddModal/SmallModalChildren.tsx index 6ceb1cf50ca..91345e1fea7 100644 --- a/app/src/molecules/OddModal/SmallModalChildren.tsx +++ b/app/src/molecules/OddModal/SmallModalChildren.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS, DIRECTION_COLUMN, diff --git a/app/src/molecules/OddModal/__tests__/OddModal.test.tsx b/app/src/molecules/OddModal/__tests__/OddModal.test.tsx index 4c289650fd8..d8c129a8b01 100644 --- a/app/src/molecules/OddModal/__tests__/OddModal.test.tsx +++ b/app/src/molecules/OddModal/__tests__/OddModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/molecules/OddModal/__tests__/OddModalHeader.test.tsx b/app/src/molecules/OddModal/__tests__/OddModalHeader.test.tsx index 3c3cb72f8b2..e824e49648c 100644 --- a/app/src/molecules/OddModal/__tests__/OddModalHeader.test.tsx +++ b/app/src/molecules/OddModal/__tests__/OddModalHeader.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/molecules/OddModal/__tests__/SmallModalChildren.test.tsx b/app/src/molecules/OddModal/__tests__/SmallModalChildren.test.tsx index 0025a806fe2..77a6e56095b 100644 --- a/app/src/molecules/OddModal/__tests__/SmallModalChildren.test.tsx +++ b/app/src/molecules/OddModal/__tests__/SmallModalChildren.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi } from 'vitest' diff --git a/app/src/molecules/OffsetVector/__tests__/OffsetVector.test.tsx b/app/src/molecules/OffsetVector/__tests__/OffsetVector.test.tsx index 14dfd05db24..bb247c0175a 100644 --- a/app/src/molecules/OffsetVector/__tests__/OffsetVector.test.tsx +++ b/app/src/molecules/OffsetVector/__tests__/OffsetVector.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, beforeEach } from 'vitest' diff --git a/app/src/molecules/OffsetVector/index.tsx b/app/src/molecules/OffsetVector/index.tsx index 47d4cf639d6..155019e8074 100644 --- a/app/src/molecules/OffsetVector/index.tsx +++ b/app/src/molecules/OffsetVector/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Flex, SPACING, diff --git a/app/src/molecules/PipetteSelect/index.tsx b/app/src/molecules/PipetteSelect/index.tsx index 80170fd0bc8..aec4e45300f 100644 --- a/app/src/molecules/PipetteSelect/index.tsx +++ b/app/src/molecules/PipetteSelect/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import groupBy from 'lodash/groupBy' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/molecules/PythonLabwareOffsetSnippet/index.tsx b/app/src/molecules/PythonLabwareOffsetSnippet/index.tsx index 00862359a37..d6e1e4bbd7d 100644 --- a/app/src/molecules/PythonLabwareOffsetSnippet/index.tsx +++ b/app/src/molecules/PythonLabwareOffsetSnippet/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import styled from 'styled-components' import { TYPOGRAPHY, SPACING, BORDERS, COLORS } from '@opentrons/components' import { createSnippet } from './createSnippet' @@ -32,8 +32,8 @@ export function PythonLabwareOffsetSnippet( props: PythonLabwareOffsetSnippetProps ): JSX.Element | null { const { commands, labware, modules, labwareOffsets, mode } = props - const [snippet, setSnippet] = React.useState(null) - React.useEffect(() => { + const [snippet, setSnippet] = useState(null) + useEffect(() => { if (labware.length > 0 && labwareOffsets != null) { setSnippet( createSnippet(mode, commands, labware, modules, labwareOffsets) diff --git a/app/src/molecules/ReleaseNotes/index.tsx b/app/src/molecules/ReleaseNotes/index.tsx index 5e59ecb5019..0c6207f84a1 100644 --- a/app/src/molecules/ReleaseNotes/index.tsx +++ b/app/src/molecules/ReleaseNotes/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import Markdown from 'react-markdown' import { Box, COLORS, SPACING, LegacyStyledText } from '@opentrons/components' diff --git a/app/src/molecules/RunTimer/RunTimer.tsx b/app/src/molecules/RunTimer/RunTimer.tsx index ba285e0bb12..74962c82bb5 100644 --- a/app/src/molecules/RunTimer/RunTimer.tsx +++ b/app/src/molecules/RunTimer/RunTimer.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { RUN_STATUS_STOP_REQUESTED } from '@opentrons/api-client' import { @@ -24,7 +24,7 @@ export function RunTimer({ completedAt: string | null style?: CSSProp }): JSX.Element { - const [now, setNow] = React.useState(Date()) + const [now, setNow] = useState(Date()) useInterval( () => { setNow(Date()) diff --git a/app/src/molecules/SimpleWizardBody/SimpleWizardBody.stories.tsx b/app/src/molecules/SimpleWizardBody/SimpleWizardBody.stories.tsx index 7b66034657b..7e73f357d45 100644 --- a/app/src/molecules/SimpleWizardBody/SimpleWizardBody.stories.tsx +++ b/app/src/molecules/SimpleWizardBody/SimpleWizardBody.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import { COLORS, PrimaryButton, ModalShell } from '@opentrons/components' diff --git a/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContainer.tsx b/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContainer.tsx index 11644dba212..fef84670b19 100644 --- a/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContainer.tsx +++ b/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContainer.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContent.tsx b/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContent.tsx index 84e83966f07..16113e28c9a 100644 --- a/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContent.tsx +++ b/app/src/molecules/SimpleWizardBody/SimpleWizardBodyContent.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { css } from 'styled-components' import { diff --git a/app/src/molecules/SimpleWizardBody/SimpleWizardInProgressBody.tsx b/app/src/molecules/SimpleWizardBody/SimpleWizardInProgressBody.tsx index 55bd83b534b..10882025dfc 100644 --- a/app/src/molecules/SimpleWizardBody/SimpleWizardInProgressBody.tsx +++ b/app/src/molecules/SimpleWizardBody/SimpleWizardInProgressBody.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import type { StyleProps } from '@opentrons/components' import { InProgressModal } from '../InProgressModal/InProgressModal' import { SimpleWizardBodyContainer } from './SimpleWizardBodyContainer' diff --git a/app/src/molecules/SimpleWizardBody/__tests__/SimpleWizardBody.test.tsx b/app/src/molecules/SimpleWizardBody/__tests__/SimpleWizardBody.test.tsx index 3d2b0103578..9849e8fa03c 100644 --- a/app/src/molecules/SimpleWizardBody/__tests__/SimpleWizardBody.test.tsx +++ b/app/src/molecules/SimpleWizardBody/__tests__/SimpleWizardBody.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { COLORS } from '@opentrons/components' diff --git a/app/src/molecules/SimpleWizardBody/index.tsx b/app/src/molecules/SimpleWizardBody/index.tsx index c0408417030..b554b71b90e 100644 --- a/app/src/molecules/SimpleWizardBody/index.tsx +++ b/app/src/molecules/SimpleWizardBody/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { SimpleWizardBodyContainer } from './SimpleWizardBodyContainer' import { SimpleWizardBodyContent } from './SimpleWizardBodyContent' diff --git a/app/src/molecules/ToggleGroup/__tests__/useToggleGroup.test.tsx b/app/src/molecules/ToggleGroup/__tests__/useToggleGroup.test.tsx index 5312b7d33c9..c4829b79615 100644 --- a/app/src/molecules/ToggleGroup/__tests__/useToggleGroup.test.tsx +++ b/app/src/molecules/ToggleGroup/__tests__/useToggleGroup.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import '@testing-library/jest-dom/vitest' diff --git a/app/src/molecules/UnorderedList/index.tsx b/app/src/molecules/UnorderedList/index.tsx index 685adc170f5..cf9937266a8 100644 --- a/app/src/molecules/UnorderedList/index.tsx +++ b/app/src/molecules/UnorderedList/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { SPACING, LegacyStyledText } from '@opentrons/components' diff --git a/app/src/molecules/UpdateBanner/__tests__/UpdateBanner.test.tsx b/app/src/molecules/UpdateBanner/__tests__/UpdateBanner.test.tsx index c40d1e2e197..52b074b37d8 100644 --- a/app/src/molecules/UpdateBanner/__tests__/UpdateBanner.test.tsx +++ b/app/src/molecules/UpdateBanner/__tests__/UpdateBanner.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { when } from 'vitest-when' diff --git a/app/src/molecules/UpdateBanner/index.tsx b/app/src/molecules/UpdateBanner/index.tsx index 7f0f70aeceb..31a7dbe3d49 100644 --- a/app/src/molecules/UpdateBanner/index.tsx +++ b/app/src/molecules/UpdateBanner/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/molecules/UploadInput/UploadInput.stories.tsx b/app/src/molecules/UploadInput/UploadInput.stories.tsx index d27cb0198d8..461e23fd01a 100644 --- a/app/src/molecules/UploadInput/UploadInput.stories.tsx +++ b/app/src/molecules/UploadInput/UploadInput.stories.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { ALIGN_CENTER, COLORS, diff --git a/app/src/molecules/UploadInput/__tests__/UploadInput.test.tsx b/app/src/molecules/UploadInput/__tests__/UploadInput.test.tsx index 92e69095ba2..5c99328ade3 100644 --- a/app/src/molecules/UploadInput/__tests__/UploadInput.test.tsx +++ b/app/src/molecules/UploadInput/__tests__/UploadInput.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/molecules/WizardHeader/WizardHeader.stories.tsx b/app/src/molecules/WizardHeader/WizardHeader.stories.tsx index 70db49aa835..0d26e4f967d 100644 --- a/app/src/molecules/WizardHeader/WizardHeader.stories.tsx +++ b/app/src/molecules/WizardHeader/WizardHeader.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { WizardHeader } from './index' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/molecules/WizardHeader/__tests__/WizardHeader.test.tsx b/app/src/molecules/WizardHeader/__tests__/WizardHeader.test.tsx index 5cecec7d87d..0e11447cac2 100644 --- a/app/src/molecules/WizardHeader/__tests__/WizardHeader.test.tsx +++ b/app/src/molecules/WizardHeader/__tests__/WizardHeader.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/molecules/WizardHeader/index.tsx b/app/src/molecules/WizardHeader/index.tsx index 1f190e64915..1b0d23baa39 100644 --- a/app/src/molecules/WizardHeader/index.tsx +++ b/app/src/molecules/WizardHeader/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/app/src/molecules/WizardRequiredEquipmentList/index.tsx b/app/src/molecules/WizardRequiredEquipmentList/index.tsx index 7f46754bf6f..3fbcd48671b 100644 --- a/app/src/molecules/WizardRequiredEquipmentList/index.tsx +++ b/app/src/molecules/WizardRequiredEquipmentList/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/molecules/modals/BottomButtonBar.tsx b/app/src/molecules/modals/BottomButtonBar.tsx index 5abb73828aa..d5c202e943c 100644 --- a/app/src/molecules/modals/BottomButtonBar.tsx +++ b/app/src/molecules/modals/BottomButtonBar.tsx @@ -1,6 +1,6 @@ // bottom button bar for modals // TODO(mc, 2018-08-18): maybe make this the default AlertModal behavior -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { OutlineButton } from '@opentrons/components' diff --git a/app/src/molecules/modals/ErrorModal.tsx b/app/src/molecules/modals/ErrorModal.tsx index f4a273a5bdb..f5422e5b2e0 100644 --- a/app/src/molecules/modals/ErrorModal.tsx +++ b/app/src/molecules/modals/ErrorModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { Link } from 'react-router-dom' import { AlertModal } from '@opentrons/components' diff --git a/app/src/molecules/modals/ScrollableAlertModal.tsx b/app/src/molecules/modals/ScrollableAlertModal.tsx index 32aae3def4f..c98846899b8 100644 --- a/app/src/molecules/modals/ScrollableAlertModal.tsx +++ b/app/src/molecules/modals/ScrollableAlertModal.tsx @@ -1,5 +1,5 @@ // AlertModal with vertical scrolling -import * as React from 'react' +import type * as React from 'react' import omit from 'lodash/omit' import { AlertModal } from '@opentrons/components' diff --git a/app/src/organisms/AdvancedSettings/AdditionalCustomLabwareSourceFolder.tsx b/app/src/organisms/AdvancedSettings/AdditionalCustomLabwareSourceFolder.tsx index 5dc07daa93e..57708f2854d 100644 --- a/app/src/organisms/AdvancedSettings/AdditionalCustomLabwareSourceFolder.tsx +++ b/app/src/organisms/AdvancedSettings/AdditionalCustomLabwareSourceFolder.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/ClearUnavailableRobots.tsx b/app/src/organisms/AdvancedSettings/ClearUnavailableRobots.tsx index 0ed7a097e88..3493f8b767c 100644 --- a/app/src/organisms/AdvancedSettings/ClearUnavailableRobots.tsx +++ b/app/src/organisms/AdvancedSettings/ClearUnavailableRobots.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/EnableDevTools.tsx b/app/src/organisms/AdvancedSettings/EnableDevTools.tsx index c117908913b..55d832027e9 100644 --- a/app/src/organisms/AdvancedSettings/EnableDevTools.tsx +++ b/app/src/organisms/AdvancedSettings/EnableDevTools.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/OT2AdvancedSettings.tsx b/app/src/organisms/AdvancedSettings/OT2AdvancedSettings.tsx index b0cb39caa1f..7ab3ebb0bd0 100644 --- a/app/src/organisms/AdvancedSettings/OT2AdvancedSettings.tsx +++ b/app/src/organisms/AdvancedSettings/OT2AdvancedSettings.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/AdvancedSettings/OverridePathToPython.tsx b/app/src/organisms/AdvancedSettings/OverridePathToPython.tsx index e8fdd2f9b92..d0e5b7d6d93 100644 --- a/app/src/organisms/AdvancedSettings/OverridePathToPython.tsx +++ b/app/src/organisms/AdvancedSettings/OverridePathToPython.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/PreventRobotCaching.tsx b/app/src/organisms/AdvancedSettings/PreventRobotCaching.tsx index b0429e50ae9..0b65e78854e 100644 --- a/app/src/organisms/AdvancedSettings/PreventRobotCaching.tsx +++ b/app/src/organisms/AdvancedSettings/PreventRobotCaching.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/ShowHeaterShakerAttachmentModal.tsx b/app/src/organisms/AdvancedSettings/ShowHeaterShakerAttachmentModal.tsx index 2883a1aba44..578872b389b 100644 --- a/app/src/organisms/AdvancedSettings/ShowHeaterShakerAttachmentModal.tsx +++ b/app/src/organisms/AdvancedSettings/ShowHeaterShakerAttachmentModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/ShowLabwareOffsetSnippets.tsx b/app/src/organisms/AdvancedSettings/ShowLabwareOffsetSnippets.tsx index b0ec158a017..61dc9a62788 100644 --- a/app/src/organisms/AdvancedSettings/ShowLabwareOffsetSnippets.tsx +++ b/app/src/organisms/AdvancedSettings/ShowLabwareOffsetSnippets.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/U2EInformation.tsx b/app/src/organisms/AdvancedSettings/U2EInformation.tsx index edbf398da2d..fb55e883dba 100644 --- a/app/src/organisms/AdvancedSettings/U2EInformation.tsx +++ b/app/src/organisms/AdvancedSettings/U2EInformation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/AdvancedSettings/UpdatedChannel.tsx b/app/src/organisms/AdvancedSettings/UpdatedChannel.tsx index 10cce14e67e..aca0348cb7b 100644 --- a/app/src/organisms/AdvancedSettings/UpdatedChannel.tsx +++ b/app/src/organisms/AdvancedSettings/UpdatedChannel.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' diff --git a/app/src/organisms/AdvancedSettings/__tests__/AdditionalCustomLabwareSourceFolder.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/AdditionalCustomLabwareSourceFolder.test.tsx index 59789b1c109..48a365afa0b 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/AdditionalCustomLabwareSourceFolder.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/AdditionalCustomLabwareSourceFolder.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/AdvancedSettings/__tests__/ClearUnavailableRobots.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/ClearUnavailableRobots.test.tsx index 352f3516204..008a74ad734 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/ClearUnavailableRobots.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/ClearUnavailableRobots.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { useConditionalConfirm } from '@opentrons/components' diff --git a/app/src/organisms/AdvancedSettings/__tests__/EnableDevTools.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/EnableDevTools.test.tsx index 5605b324688..25014b0cedf 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/EnableDevTools.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/EnableDevTools.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/AdvancedSettings/__tests__/OT2AdvancedSettings.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/OT2AdvancedSettings.test.tsx index 6cfc5acd81f..3cff50268bd 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/OT2AdvancedSettings.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/OT2AdvancedSettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/AdvancedSettings/__tests__/OverridePathToPython.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/OverridePathToPython.test.tsx index c7f001c73f0..78574ff0eca 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/OverridePathToPython.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/OverridePathToPython.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/AdvancedSettings/__tests__/PreventRobotCaching.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/PreventRobotCaching.test.tsx index 3fe5de32faf..094a1ffac90 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/PreventRobotCaching.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/PreventRobotCaching.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { describe, it, expect, vi, beforeEach } from 'vitest' import { screen, fireEvent } from '@testing-library/react' diff --git a/app/src/organisms/AdvancedSettings/__tests__/ShowHeaterShakerAttachmentModal.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/ShowHeaterShakerAttachmentModal.test.tsx index 623ca64c493..a91eec5495f 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/ShowHeaterShakerAttachmentModal.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/ShowHeaterShakerAttachmentModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/AdvancedSettings/__tests__/ShowLabwareOffsetSnippets.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/ShowLabwareOffsetSnippets.test.tsx index 30eade7b245..047e310c628 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/ShowLabwareOffsetSnippets.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/ShowLabwareOffsetSnippets.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/AdvancedSettings/__tests__/U2EInformation.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/U2EInformation.test.tsx index 2aa4a5a7858..a885226096d 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/U2EInformation.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/U2EInformation.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/AdvancedSettings/__tests__/UpdatedChannel.test.tsx b/app/src/organisms/AdvancedSettings/__tests__/UpdatedChannel.test.tsx index 84c3bf76438..c6feb1c0c8d 100644 --- a/app/src/organisms/AdvancedSettings/__tests__/UpdatedChannel.test.tsx +++ b/app/src/organisms/AdvancedSettings/__tests__/UpdatedChannel.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/Alerts/AlertsModal.tsx b/app/src/organisms/Alerts/AlertsModal.tsx index 2e9375f4ec8..820756f907a 100644 --- a/app/src/organisms/Alerts/AlertsModal.tsx +++ b/app/src/organisms/Alerts/AlertsModal.tsx @@ -1,20 +1,20 @@ -import * as React from 'react' +import type { MutableRefObject } from 'react' +import { useState, useEffect } from 'react' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' import head from 'lodash/head' -import { SUCCESS_TOAST, WARNING_TOAST } from '@opentrons/components' +import { SUCCESS_TOAST, WARNING_TOAST } from '@opentrons/components' import * as AppAlerts from '/app/redux/alerts' import { getHasJustUpdated, toggleConfigValue } from '/app/redux/config' import { getAvailableShellUpdate } from '/app/redux/shell' import { useToaster } from '../ToasterOven' import { UpdateAppModal } from '../UpdateAppModal' import { U2EDriverOutdatedAlert } from './U2EDriverOutdatedAlert' -import { useRemoveActiveAppUpdateToast } from '.' +import { useRemoveActiveAppUpdateToast } from '.' import type { State, Dispatch } from '/app/redux/types' import type { AlertId } from '/app/redux/alerts/types' -import type { MutableRefObject } from 'react' interface AlertsModalProps { toastIdRef: MutableRefObject @@ -22,7 +22,7 @@ interface AlertsModalProps { export function AlertsModal({ toastIdRef }: AlertsModalProps): JSX.Element { const dispatch = useDispatch() - const [showUpdateModal, setShowUpdateModal] = React.useState(false) + const [showUpdateModal, setShowUpdateModal] = useState(false) const { t } = useTranslation(['app_settings', 'branded']) const { makeToast } = useToaster() const { removeActiveAppUpdateToast } = useRemoveActiveAppUpdateToast() @@ -51,7 +51,7 @@ export function AlertsModal({ toastIdRef }: AlertsModalProps): JSX.Element { isAppUpdateAvailable && !isAppUpdateIgnored // Only run this hook on app startup - React.useEffect(() => { + useEffect(() => { if (hasJustUpdated) { makeToast( t('branded:opentrons_app_successfully_updated') as string, @@ -65,7 +65,7 @@ export function AlertsModal({ toastIdRef }: AlertsModalProps): JSX.Element { } }, []) - React.useEffect(() => { + useEffect(() => { if (createAppUpdateAvailableToast) { toastIdRef.current = makeToast( t('branded:opentrons_app_update_available_variation') as string, diff --git a/app/src/organisms/Alerts/U2EDriverOutdatedAlert.tsx b/app/src/organisms/Alerts/U2EDriverOutdatedAlert.tsx index 5888fa19396..fbb79a6b935 100644 --- a/app/src/organisms/Alerts/U2EDriverOutdatedAlert.tsx +++ b/app/src/organisms/Alerts/U2EDriverOutdatedAlert.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Link as InternalLink } from 'react-router-dom' import styled from 'styled-components' diff --git a/app/src/organisms/Alerts/useRemoveActiveAppUpdateToast.ts.ts b/app/src/organisms/Alerts/useRemoveActiveAppUpdateToast.ts.ts index 030639ededa..a45a88716e8 100644 --- a/app/src/organisms/Alerts/useRemoveActiveAppUpdateToast.ts.ts +++ b/app/src/organisms/Alerts/useRemoveActiveAppUpdateToast.ts.ts @@ -1,7 +1,7 @@ -import * as React from 'react' +import { useContext } from 'react' import { AlertsContext } from '.' import type { AlertsContextProps } from '.' export function useRemoveActiveAppUpdateToast(): AlertsContextProps { - return React.useContext(AlertsContext) + return useContext(AlertsContext) } diff --git a/app/src/organisms/AppSettings/ConnectRobotSlideout.tsx b/app/src/organisms/AppSettings/ConnectRobotSlideout.tsx index 4e003d3f9cf..7c3148796d9 100644 --- a/app/src/organisms/AppSettings/ConnectRobotSlideout.tsx +++ b/app/src/organisms/AppSettings/ConnectRobotSlideout.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -37,10 +37,10 @@ export function ConnectRobotSlideout({ isExpanded, onCloseClick, }: ConnectRobotSlideoutProps): JSX.Element | null { - const [mostRecentAddition, setMostRecentAddition] = React.useState< - string | null - >(null) - const [mostRecentDiscovered, setMostRecentDiscovered] = React.useState< + const [mostRecentAddition, setMostRecentAddition] = useState( + null + ) + const [mostRecentDiscovered, setMostRecentDiscovered] = useState< boolean | null >(null) const { t } = useTranslation(['app_settings', 'shared', 'branded']) @@ -62,7 +62,7 @@ export function ConnectRobotSlideout({ ) } - React.useEffect(() => { + useEffect(() => { dispatch(startDiscovery()) }, [dispatch]) diff --git a/app/src/organisms/AppSettings/FeatureFlags.tsx b/app/src/organisms/AppSettings/FeatureFlags.tsx index f53c5501056..d86b52534ab 100644 --- a/app/src/organisms/AppSettings/FeatureFlags.tsx +++ b/app/src/organisms/AppSettings/FeatureFlags.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import { @@ -32,7 +32,7 @@ export function FeatureFlags(): JSX.Element { paddingY={SPACING.spacing24} > {Config.DEV_INTERNAL_FLAGS.map((flag, index) => ( - + )} - + ))} ) diff --git a/app/src/organisms/AppSettings/ManualIpHostnameField.tsx b/app/src/organisms/AppSettings/ManualIpHostnameField.tsx index 8d249518ae4..c7b179ab4cd 100644 --- a/app/src/organisms/AppSettings/ManualIpHostnameField.tsx +++ b/app/src/organisms/AppSettings/ManualIpHostnameField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/AppSettings/ManualIpHostnameForm.tsx b/app/src/organisms/AppSettings/ManualIpHostnameForm.tsx index ab9119c7fcf..52892422dce 100644 --- a/app/src/organisms/AppSettings/ManualIpHostnameForm.tsx +++ b/app/src/organisms/AppSettings/ManualIpHostnameForm.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' import { useForm } from 'react-hook-form' diff --git a/app/src/organisms/AppSettings/ManualIpHostnameItem.tsx b/app/src/organisms/AppSettings/ManualIpHostnameItem.tsx index 70dc5797d64..5a1dde3b663 100644 --- a/app/src/organisms/AppSettings/ManualIpHostnameItem.tsx +++ b/app/src/organisms/AppSettings/ManualIpHostnameItem.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' @@ -68,7 +68,7 @@ export function ManualIpHostnameItem({ } } - React.useEffect(() => { + useEffect(() => { if (justAdded) { setMostRecentDiscovered(discovered) // Note this is to avoid the case that not found but not display the message diff --git a/app/src/organisms/AppSettings/ManualIpHostnameList.tsx b/app/src/organisms/AppSettings/ManualIpHostnameList.tsx index f74675750ca..1e96b60010d 100644 --- a/app/src/organisms/AppSettings/ManualIpHostnameList.tsx +++ b/app/src/organisms/AppSettings/ManualIpHostnameList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useSelector, useDispatch } from 'react-redux' import { getConfig, removeManualIp } from '/app/redux/config' @@ -38,7 +38,7 @@ export function ManualIpHostnameList({ bDiscovered && !aDiscovered ? -1 : 1 ) .map(([candidate, discovered], index) => ( - + dispatch(removeManualIp(candidate))} @@ -48,7 +48,7 @@ export function ManualIpHostnameList({ setMostRecentDiscovered={setMostRecentDiscovered} isLast={index === candidates.length - 1} /> - + )) : null} diff --git a/app/src/organisms/AppSettings/PreviousVersionModal.tsx b/app/src/organisms/AppSettings/PreviousVersionModal.tsx index 81fece0fbdc..3b3a58f2cc1 100644 --- a/app/src/organisms/AppSettings/PreviousVersionModal.tsx +++ b/app/src/organisms/AppSettings/PreviousVersionModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Box, diff --git a/app/src/organisms/AppSettings/__tests__/ConnectRobotSlideout.test.tsx b/app/src/organisms/AppSettings/__tests__/ConnectRobotSlideout.test.tsx index 069a66dde38..c92e1f495a0 100644 --- a/app/src/organisms/AppSettings/__tests__/ConnectRobotSlideout.test.tsx +++ b/app/src/organisms/AppSettings/__tests__/ConnectRobotSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/AppSettings/__tests__/PreviousVersionModal.test.tsx b/app/src/organisms/AppSettings/__tests__/PreviousVersionModal.test.tsx index 853bf6c2257..b4449623c05 100644 --- a/app/src/organisms/AppSettings/__tests__/PreviousVersionModal.test.tsx +++ b/app/src/organisms/AppSettings/__tests__/PreviousVersionModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ApplyHistoricOffsets/LabwareOffsetTable.tsx b/app/src/organisms/ApplyHistoricOffsets/LabwareOffsetTable.tsx index 285229f4f8e..acfc27db683 100644 --- a/app/src/organisms/ApplyHistoricOffsets/LabwareOffsetTable.tsx +++ b/app/src/organisms/ApplyHistoricOffsets/LabwareOffsetTable.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { SPACING, TYPOGRAPHY, COLORS } from '@opentrons/components' diff --git a/app/src/organisms/ApplyHistoricOffsets/__tests__/ApplyHistoricOffsets.test.tsx b/app/src/organisms/ApplyHistoricOffsets/__tests__/ApplyHistoricOffsets.test.tsx index 8a638843a68..1bc7e55abd0 100644 --- a/app/src/organisms/ApplyHistoricOffsets/__tests__/ApplyHistoricOffsets.test.tsx +++ b/app/src/organisms/ApplyHistoricOffsets/__tests__/ApplyHistoricOffsets.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi } from 'vitest' diff --git a/app/src/organisms/ApplyHistoricOffsets/__tests__/LabwareOffsetTable.test.tsx b/app/src/organisms/ApplyHistoricOffsets/__tests__/LabwareOffsetTable.test.tsx index 742a5f7f50b..8b527e239f1 100644 --- a/app/src/organisms/ApplyHistoricOffsets/__tests__/LabwareOffsetTable.test.tsx +++ b/app/src/organisms/ApplyHistoricOffsets/__tests__/LabwareOffsetTable.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' import { fixture96Plate, fixtureTiprackAdapter } from '@opentrons/shared-data' diff --git a/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useHistoricRunDetails.test.tsx b/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useHistoricRunDetails.test.tsx index 5fe40a9333e..a697fabb2d3 100644 --- a/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useHistoricRunDetails.test.tsx +++ b/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useHistoricRunDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi } from 'vitest' import { when } from 'vitest-when' import { renderHook, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useOffsetCandidatesForAnalysis.test.tsx b/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useOffsetCandidatesForAnalysis.test.tsx index 48cfcfb3f78..832417cb9af 100644 --- a/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useOffsetCandidatesForAnalysis.test.tsx +++ b/app/src/organisms/ApplyHistoricOffsets/hooks/__tests__/useOffsetCandidatesForAnalysis.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { when } from 'vitest-when' import { renderHook, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/Breadcrumbs/__tests__/Breadcrumbs.test.tsx b/app/src/organisms/Breadcrumbs/__tests__/Breadcrumbs.test.tsx index b3ec689bf0b..559c6e3cf2b 100644 --- a/app/src/organisms/Breadcrumbs/__tests__/Breadcrumbs.test.tsx +++ b/app/src/organisms/Breadcrumbs/__tests__/Breadcrumbs.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter, Route, Routes } from 'react-router-dom' import { when } from 'vitest-when' import { describe, it, expect, beforeEach, vi } from 'vitest' diff --git a/app/src/organisms/Breadcrumbs/index.tsx b/app/src/organisms/Breadcrumbs/index.tsx index 5989d42cc28..6b26b390f79 100644 --- a/app/src/organisms/Breadcrumbs/index.tsx +++ b/app/src/organisms/Breadcrumbs/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { Link, useParams, useLocation } from 'react-router-dom' diff --git a/app/src/organisms/CalibrateDeck/__tests__/CalibrateDeck.test.tsx b/app/src/organisms/CalibrateDeck/__tests__/CalibrateDeck.test.tsx index fe899c601fd..ac5e8822416 100644 --- a/app/src/organisms/CalibrateDeck/__tests__/CalibrateDeck.test.tsx +++ b/app/src/organisms/CalibrateDeck/__tests__/CalibrateDeck.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, beforeEach, expect, it } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibratePipetteOffset/__tests__/CalibratePipetteOffset.test.tsx b/app/src/organisms/CalibratePipetteOffset/__tests__/CalibratePipetteOffset.test.tsx index a5eaae716ff..7f85d0ad109 100644 --- a/app/src/organisms/CalibratePipetteOffset/__tests__/CalibratePipetteOffset.test.tsx +++ b/app/src/organisms/CalibratePipetteOffset/__tests__/CalibratePipetteOffset.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibratePipetteOffset/useCalibratePipetteOffset.tsx b/app/src/organisms/CalibratePipetteOffset/useCalibratePipetteOffset.tsx index 2759c30021d..2cbb250d73c 100644 --- a/app/src/organisms/CalibratePipetteOffset/useCalibratePipetteOffset.tsx +++ b/app/src/organisms/CalibratePipetteOffset/useCalibratePipetteOffset.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useEffect } from 'react' import { createPortal } from 'react-dom' import { useSelector, useDispatch } from 'react-redux' @@ -38,10 +38,10 @@ export function useCalibratePipetteOffset( onComplete: (() => unknown) | null = null ): [Invoker, JSX.Element | null] { const { t } = useTranslation(['robot_calibration', 'shared']) - const createRequestId = React.useRef(null) - const deleteRequestId = React.useRef(null) - const jogRequestId = React.useRef(null) - const spinnerRequestId = React.useRef(null) + const createRequestId = useRef(null) + const deleteRequestId = useRef(null) + const jogRequestId = useRef(null) + const spinnerRequestId = useRef(null) const dispatch = useDispatch() const pipOffsetCalSession: PipetteOffsetCalibrationSession | null = useSelector( @@ -112,7 +112,7 @@ export function useCalibratePipetteOffset( : null )?.status === RobotApi.PENDING - React.useEffect(() => { + useEffect(() => { if (shouldClose) { onComplete?.() deleteRequestId.current = null diff --git a/app/src/organisms/CalibrateTipLength/ConfirmRecalibrationModal.tsx b/app/src/organisms/CalibrateTipLength/ConfirmRecalibrationModal.tsx index fb413eed6cb..734b8f7ef0e 100644 --- a/app/src/organisms/CalibrateTipLength/ConfirmRecalibrationModal.tsx +++ b/app/src/organisms/CalibrateTipLength/ConfirmRecalibrationModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { diff --git a/app/src/organisms/CalibrateTipLength/TipLengthCalibrationInfoBox.tsx b/app/src/organisms/CalibrateTipLength/TipLengthCalibrationInfoBox.tsx index 0869293922c..7bcf3bd81e3 100644 --- a/app/src/organisms/CalibrateTipLength/TipLengthCalibrationInfoBox.tsx +++ b/app/src/organisms/CalibrateTipLength/TipLengthCalibrationInfoBox.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box, Text, diff --git a/app/src/organisms/CalibrateTipLength/__tests__/AskForCalibrationBlockModal.test.tsx b/app/src/organisms/CalibrateTipLength/__tests__/AskForCalibrationBlockModal.test.tsx index 5c9e4fac976..199ec279988 100644 --- a/app/src/organisms/CalibrateTipLength/__tests__/AskForCalibrationBlockModal.test.tsx +++ b/app/src/organisms/CalibrateTipLength/__tests__/AskForCalibrationBlockModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/CalibrateTipLength/__tests__/CalibrateTipLength.test.tsx b/app/src/organisms/CalibrateTipLength/__tests__/CalibrateTipLength.test.tsx index babf1c2e9d0..8753a346cbf 100644 --- a/app/src/organisms/CalibrateTipLength/__tests__/CalibrateTipLength.test.tsx +++ b/app/src/organisms/CalibrateTipLength/__tests__/CalibrateTipLength.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' diff --git a/app/src/organisms/CalibrationPanels/CalibrationLabwareRender.tsx b/app/src/organisms/CalibrationPanels/CalibrationLabwareRender.tsx index e81adfe525b..2e789e7f116 100644 --- a/app/src/organisms/CalibrationPanels/CalibrationLabwareRender.tsx +++ b/app/src/organisms/CalibrationPanels/CalibrationLabwareRender.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { LabwareRender, LabwareNameOverlay, diff --git a/app/src/organisms/CalibrationPanels/ChooseTipRack.tsx b/app/src/organisms/CalibrationPanels/ChooseTipRack.tsx index 94541d6b7c7..9eba4813786 100644 --- a/app/src/organisms/CalibrationPanels/ChooseTipRack.tsx +++ b/app/src/organisms/CalibrationPanels/ChooseTipRack.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { Trans, useTranslation } from 'react-i18next' import head from 'lodash/head' @@ -153,7 +153,7 @@ export function ChooseTipRack(props: ChooseTipRackProps): JSX.Element { ] : [...opentronsTipRacksOptions] - const [selectedValue, setSelectedValue] = React.useState< + const [selectedValue, setSelectedValue] = useState< SingleValue | MultiValue >( chosenTipRack != null diff --git a/app/src/organisms/CalibrationPanels/ChosenTipRackRender.tsx b/app/src/organisms/CalibrationPanels/ChosenTipRackRender.tsx index 98d1ebb4499..780bcac2973 100644 --- a/app/src/organisms/CalibrationPanels/ChosenTipRackRender.tsx +++ b/app/src/organisms/CalibrationPanels/ChosenTipRackRender.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/organisms/CalibrationPanels/CompleteConfirmation.tsx b/app/src/organisms/CalibrationPanels/CompleteConfirmation.tsx index 7d11b2243a9..cbd0e214cd1 100644 --- a/app/src/organisms/CalibrationPanels/CompleteConfirmation.tsx +++ b/app/src/organisms/CalibrationPanels/CompleteConfirmation.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/CalibrationPanels/ConfirmCrashRecovery.tsx b/app/src/organisms/CalibrationPanels/ConfirmCrashRecovery.tsx index 43a55cabaa2..b2ac7b52179 100644 --- a/app/src/organisms/CalibrationPanels/ConfirmCrashRecovery.tsx +++ b/app/src/organisms/CalibrationPanels/ConfirmCrashRecovery.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/CalibrationPanels/ConfirmExit.tsx b/app/src/organisms/CalibrationPanels/ConfirmExit.tsx index 4d52a7424e9..36ae9c7d5b8 100644 --- a/app/src/organisms/CalibrationPanels/ConfirmExit.tsx +++ b/app/src/organisms/CalibrationPanels/ConfirmExit.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { AlertPrimaryButton, diff --git a/app/src/organisms/CalibrationPanels/DeckSetup.tsx b/app/src/organisms/CalibrationPanels/DeckSetup.tsx index 230b0456161..22d648a5335 100644 --- a/app/src/organisms/CalibrationPanels/DeckSetup.tsx +++ b/app/src/organisms/CalibrationPanels/DeckSetup.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { useTranslation } from 'react-i18next' import map from 'lodash/map' @@ -28,7 +28,7 @@ import type { CalibrationPanelProps } from './types' const TIPRACK = 'tip rack' export function DeckSetup(props: CalibrationPanelProps): JSX.Element { - const deckDef = React.useMemo(() => getDeckDefinitions().ot2_standard, []) + const deckDef = useMemo(() => getDeckDefinitions().ot2_standard, []) const { t } = useTranslation('robot_calibration') diff --git a/app/src/organisms/CalibrationPanels/Introduction/Body.tsx b/app/src/organisms/CalibrationPanels/Introduction/Body.tsx index 410e6d02423..8f67637f6c4 100644 --- a/app/src/organisms/CalibrationPanels/Introduction/Body.tsx +++ b/app/src/organisms/CalibrationPanels/Introduction/Body.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { LegacyStyledText } from '@opentrons/components' import * as Sessions from '/app/redux/sessions' diff --git a/app/src/organisms/CalibrationPanels/Introduction/InvalidationWarning.tsx b/app/src/organisms/CalibrationPanels/Introduction/InvalidationWarning.tsx index 8f22e01fabc..dbe27f7358a 100644 --- a/app/src/organisms/CalibrationPanels/Introduction/InvalidationWarning.tsx +++ b/app/src/organisms/CalibrationPanels/Introduction/InvalidationWarning.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex, Banner, diff --git a/app/src/organisms/CalibrationPanels/Introduction/__tests__/Body.test.tsx b/app/src/organisms/CalibrationPanels/Introduction/__tests__/Body.test.tsx index 5de8c58d35c..c1300fb3218 100644 --- a/app/src/organisms/CalibrationPanels/Introduction/__tests__/Body.test.tsx +++ b/app/src/organisms/CalibrationPanels/Introduction/__tests__/Body.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibrationPanels/Introduction/__tests__/Introduction.test.tsx b/app/src/organisms/CalibrationPanels/Introduction/__tests__/Introduction.test.tsx index a5f0f6b59c0..a34460571ed 100644 --- a/app/src/organisms/CalibrationPanels/Introduction/__tests__/Introduction.test.tsx +++ b/app/src/organisms/CalibrationPanels/Introduction/__tests__/Introduction.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibrationPanels/Introduction/__tests__/InvalidationWarning.test.tsx b/app/src/organisms/CalibrationPanels/Introduction/__tests__/InvalidationWarning.test.tsx index da55d8a6b26..6151097eccf 100644 --- a/app/src/organisms/CalibrationPanels/Introduction/__tests__/InvalidationWarning.test.tsx +++ b/app/src/organisms/CalibrationPanels/Introduction/__tests__/InvalidationWarning.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { it, describe } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibrationPanels/Introduction/index.tsx b/app/src/organisms/CalibrationPanels/Introduction/index.tsx index 1f5f85dbd16..3106786ec30 100644 --- a/app/src/organisms/CalibrationPanels/Introduction/index.tsx +++ b/app/src/organisms/CalibrationPanels/Introduction/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { getLabwareDisplayName } from '@opentrons/shared-data' import { @@ -39,11 +39,10 @@ export function Introduction(props: CalibrationPanelProps): JSX.Element { } = props const { t } = useTranslation('robot_calibration') - const [showChooseTipRack, setShowChooseTipRack] = React.useState(false) - const [ - chosenTipRack, - setChosenTipRack, - ] = React.useState(null) + const [showChooseTipRack, setShowChooseTipRack] = useState(false) + const [chosenTipRack, setChosenTipRack] = useState( + null + ) const handleChosenTipRack = (value: LabwareDefinition2 | null): void => { value != null && setChosenTipRack(value) diff --git a/app/src/organisms/CalibrationPanels/LoadingState.tsx b/app/src/organisms/CalibrationPanels/LoadingState.tsx index 03e491af459..0327e13d86c 100644 --- a/app/src/organisms/CalibrationPanels/LoadingState.tsx +++ b/app/src/organisms/CalibrationPanels/LoadingState.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_CENTER, COLORS, diff --git a/app/src/organisms/CalibrationPanels/MeasureNozzle.tsx b/app/src/organisms/CalibrationPanels/MeasureNozzle.tsx index 34afa5d7fd2..7e5e6f38f80 100644 --- a/app/src/organisms/CalibrationPanels/MeasureNozzle.tsx +++ b/app/src/organisms/CalibrationPanels/MeasureNozzle.tsx @@ -1,5 +1,5 @@ /* eslint-disable no-return-assign */ -import * as React from 'react' +import { useMemo } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { @@ -82,7 +82,7 @@ export function MeasureNozzle(props: CalibrationPanelProps): JSX.Element { const { t } = useTranslation('robot_calibration') const { sendCommands, calBlock, mount, isMulti, sessionType } = props - const demoAsset = React.useMemo( + const demoAsset = useMemo( () => calBlock != null ? assetMapBlock[sessionType]?.[mount]?.[isMulti ? 'multi' : 'single'] diff --git a/app/src/organisms/CalibrationPanels/MeasureTip.tsx b/app/src/organisms/CalibrationPanels/MeasureTip.tsx index 63bb5723bad..542cc1a1511 100644 --- a/app/src/organisms/CalibrationPanels/MeasureTip.tsx +++ b/app/src/organisms/CalibrationPanels/MeasureTip.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { @@ -82,7 +82,7 @@ export function MeasureTip(props: CalibrationPanelProps): JSX.Element { const { t } = useTranslation('robot_calibration') const { sendCommands, calBlock, isMulti, mount, sessionType } = props - const demoAsset = React.useMemo( + const demoAsset = useMemo( () => calBlock != null ? assetMapBlock[sessionType]?.[mount]?.[isMulti ? 'multi' : 'single'] diff --git a/app/src/organisms/CalibrationPanels/NeedHelpLink.tsx b/app/src/organisms/CalibrationPanels/NeedHelpLink.tsx index 01dac649b39..a87a7808827 100644 --- a/app/src/organisms/CalibrationPanels/NeedHelpLink.tsx +++ b/app/src/organisms/CalibrationPanels/NeedHelpLink.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { Flex, diff --git a/app/src/organisms/CalibrationPanels/SaveXYPoint.tsx b/app/src/organisms/CalibrationPanels/SaveXYPoint.tsx index 207f0a609c9..c727f9ce6fe 100644 --- a/app/src/organisms/CalibrationPanels/SaveXYPoint.tsx +++ b/app/src/organisms/CalibrationPanels/SaveXYPoint.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { @@ -143,7 +143,7 @@ export function SaveXYPoint(props: CalibrationPanelProps): JSX.Element | null { const { slotNumber, moveCommand } = contentsBySessionTypeByCurrentStep[sessionType]?.[currentStep] ?? {} - const demoAsset = React.useMemo( + const demoAsset = useMemo( () => slotNumber != null ? assetMap[slotNumber][mount][isMulti ? 'multi' : 'single'] diff --git a/app/src/organisms/CalibrationPanels/TipConfirmation.tsx b/app/src/organisms/CalibrationPanels/TipConfirmation.tsx index da25aef6ee5..88495309621 100644 --- a/app/src/organisms/CalibrationPanels/TipConfirmation.tsx +++ b/app/src/organisms/CalibrationPanels/TipConfirmation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/CalibrationPanels/TipPickUp.tsx b/app/src/organisms/CalibrationPanels/TipPickUp.tsx index f8008a98ede..d7360f9c052 100644 --- a/app/src/organisms/CalibrationPanels/TipPickUp.tsx +++ b/app/src/organisms/CalibrationPanels/TipPickUp.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { Trans, useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/CalibrationPanels/__tests__/ChooseTipRack.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/ChooseTipRack.test.tsx index fb41e694dbd..4bb1cecd0ef 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/ChooseTipRack.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/ChooseTipRack.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/ChosenTipRackRender.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/ChosenTipRackRender.test.tsx index 11662e1bd1e..5eb7fa1db8b 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/ChosenTipRackRender.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/ChosenTipRackRender.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibrationPanels/__tests__/CompleteConfirmation.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/CompleteConfirmation.test.tsx index d5ff26ba96c..99dc73310d1 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/CompleteConfirmation.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/CompleteConfirmation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/ConfirmCrashRecovery.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/ConfirmCrashRecovery.test.tsx index 51f70785f82..53fb8559e55 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/ConfirmCrashRecovery.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/ConfirmCrashRecovery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/ConfirmExit.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/ConfirmExit.test.tsx index eaec356c62c..086c122e8bf 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/ConfirmExit.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/ConfirmExit.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx index 920e6463cb9..bfa641e6b26 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/CalibrationPanels/__tests__/MeasureNozzle.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/MeasureNozzle.test.tsx index a7a8d68773f..d0de251b0ad 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/MeasureNozzle.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/MeasureNozzle.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/MeasureTip.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/MeasureTip.test.tsx index f2436f9af0f..70d8ab54a6b 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/MeasureTip.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/MeasureTip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/SaveXYPoint.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/SaveXYPoint.test.tsx index feabd927785..3d7dbda32a9 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/SaveXYPoint.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/SaveXYPoint.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/SaveZPoint.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/SaveZPoint.test.tsx index 480686c489b..36f04c1ebb2 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/SaveZPoint.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/SaveZPoint.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/TipConfirmation.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/TipConfirmation.test.tsx index a0b26400005..f9eee22d78b 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/TipConfirmation.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/TipConfirmation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/TipPickUp.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/TipPickUp.test.tsx index 7aa63cc6a2f..b6836cf96fb 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/TipPickUp.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/TipPickUp.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/__tests__/useConfirmCrashRecovery.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/useConfirmCrashRecovery.test.tsx index 54ca33eb5b3..9e385a2c320 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/useConfirmCrashRecovery.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/useConfirmCrashRecovery.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, renderHook, screen } from '@testing-library/react' import { I18nextProvider } from 'react-i18next' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/CalibrationPanels/useConfirmCrashRecovery.tsx b/app/src/organisms/CalibrationPanels/useConfirmCrashRecovery.tsx index 5f6058281c5..e4b9bb2c13f 100644 --- a/app/src/organisms/CalibrationPanels/useConfirmCrashRecovery.tsx +++ b/app/src/organisms/CalibrationPanels/useConfirmCrashRecovery.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { @@ -20,7 +20,7 @@ export function useConfirmCrashRecovery( ): [link: JSX.Element, confirmation: JSX.Element | null] { const { t } = useTranslation('robot_calibration') const { sendCommands } = props - const [showModal, setShowModal] = React.useState(false) + const [showModal, setShowModal] = useState(false) const doStartOver = (): void => { sendCommands({ command: Sessions.sharedCalCommands.INVALIDATE_LAST_ACTION }) diff --git a/app/src/organisms/CalibrationStatusCard/__tests__/CalibrationStatusCard.test.tsx b/app/src/organisms/CalibrationStatusCard/__tests__/CalibrationStatusCard.test.tsx index a1060e5200d..400e73b3078 100644 --- a/app/src/organisms/CalibrationStatusCard/__tests__/CalibrationStatusCard.test.tsx +++ b/app/src/organisms/CalibrationStatusCard/__tests__/CalibrationStatusCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibrationStatusCard/index.tsx b/app/src/organisms/CalibrationStatusCard/index.tsx index 057a9403585..9be7eecb1c2 100644 --- a/app/src/organisms/CalibrationStatusCard/index.tsx +++ b/app/src/organisms/CalibrationStatusCard/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Link as RouterLink } from 'react-router-dom' diff --git a/app/src/organisms/CalibrationTaskList/__tests__/CalibrationTaskList.test.tsx b/app/src/organisms/CalibrationTaskList/__tests__/CalibrationTaskList.test.tsx index 689c7f48c80..ebada58f1f3 100644 --- a/app/src/organisms/CalibrationTaskList/__tests__/CalibrationTaskList.test.tsx +++ b/app/src/organisms/CalibrationTaskList/__tests__/CalibrationTaskList.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/CalibrationTaskList/index.tsx b/app/src/organisms/CalibrationTaskList/index.tsx index 19ee91beec0..8596e82e77c 100644 --- a/app/src/organisms/CalibrationTaskList/index.tsx +++ b/app/src/organisms/CalibrationTaskList/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' @@ -45,14 +45,11 @@ export function CalibrationTaskList({ deckCalLauncher, exitBeforeDeckConfigCompletion, }: CalibrationTaskListProps): JSX.Element { - const prevActiveIndex = React.useRef<[number, number] | null>(null) - const [hasLaunchedWizard, setHasLaunchedWizard] = React.useState( + const prevActiveIndex = useRef<[number, number] | null>(null) + const [hasLaunchedWizard, setHasLaunchedWizard] = useState(false) + const [showCompletionScreen, setShowCompletionScreen] = useState( false ) - const [ - showCompletionScreen, - setShowCompletionScreen, - ] = React.useState(false) const { t } = useTranslation(['robot_calibration', 'device_settings']) const navigate = useNavigate() const { activeIndex, taskList, taskListStatus } = useCalibrationTaskList( @@ -77,7 +74,7 @@ export function CalibrationTaskList({ 'device_settings:some_robot_controls_are_not_available' ) - React.useEffect(() => { + useEffect(() => { if ( prevActiveIndex.current !== null && activeIndex === null && diff --git a/app/src/organisms/ChangePipette/ClearDeckModal.tsx b/app/src/organisms/ChangePipette/ClearDeckModal.tsx index dc89fc4ff7c..5fb2cd79de1 100644 --- a/app/src/organisms/ChangePipette/ClearDeckModal.tsx +++ b/app/src/organisms/ChangePipette/ClearDeckModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/ChangePipette/ConfirmPipette.tsx b/app/src/organisms/ChangePipette/ConfirmPipette.tsx index c9c603905a1..f756059d003 100644 --- a/app/src/organisms/ChangePipette/ConfirmPipette.tsx +++ b/app/src/organisms/ChangePipette/ConfirmPipette.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { OT2_ROBOT_TYPE } from '@opentrons/shared-data' import { diff --git a/app/src/organisms/ChangePipette/ExitModal.tsx b/app/src/organisms/ChangePipette/ExitModal.tsx index 15ab8132dc6..619b35cea36 100644 --- a/app/src/organisms/ChangePipette/ExitModal.tsx +++ b/app/src/organisms/ChangePipette/ExitModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { COLORS, diff --git a/app/src/organisms/ChangePipette/InstructionStep.tsx b/app/src/organisms/ChangePipette/InstructionStep.tsx index a12ae6827e3..05d43fdd11c 100644 --- a/app/src/organisms/ChangePipette/InstructionStep.tsx +++ b/app/src/organisms/ChangePipette/InstructionStep.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box, Flex, JUSTIFY_SPACE_EVENLY, SPACING } from '@opentrons/components' import type { PipetteChannels, diff --git a/app/src/organisms/ChangePipette/Instructions.tsx b/app/src/organisms/ChangePipette/Instructions.tsx index 4582dafafe5..cffdceca835 100644 --- a/app/src/organisms/ChangePipette/Instructions.tsx +++ b/app/src/organisms/ChangePipette/Instructions.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { css } from 'styled-components' import { Trans, useTranslation } from 'react-i18next' import { @@ -69,7 +69,7 @@ export function Instructions(props: Props): JSX.Element { } = props const { t } = useTranslation('change_pipette') - React.useEffect(() => { + useEffect(() => { if (direction === 'detach' && currentStepCount === 0) { nextStep() } diff --git a/app/src/organisms/ChangePipette/LevelPipette.tsx b/app/src/organisms/ChangePipette/LevelPipette.tsx index d3f69909f5d..db49a4d6861 100644 --- a/app/src/organisms/ChangePipette/LevelPipette.tsx +++ b/app/src/organisms/ChangePipette/LevelPipette.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/ChangePipette/PipetteSelection.tsx b/app/src/organisms/ChangePipette/PipetteSelection.tsx index 58151b8610d..c306f132154 100644 --- a/app/src/organisms/ChangePipette/PipetteSelection.tsx +++ b/app/src/organisms/ChangePipette/PipetteSelection.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/ChangePipette/__tests__/ChangePipette.test.tsx b/app/src/organisms/ChangePipette/__tests__/ChangePipette.test.tsx index 026f46def96..89112a484d4 100644 --- a/app/src/organisms/ChangePipette/__tests__/ChangePipette.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/ChangePipette.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ChangePipette/__tests__/CheckPipettesButton.test.tsx b/app/src/organisms/ChangePipette/__tests__/CheckPipettesButton.test.tsx index 41c8afcb08c..a5fa3a50bd6 100644 --- a/app/src/organisms/ChangePipette/__tests__/CheckPipettesButton.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/CheckPipettesButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/ChangePipette/__tests__/ClearDeckModal.test.tsx b/app/src/organisms/ChangePipette/__tests__/ClearDeckModal.test.tsx index faae99c439c..f4af4566141 100644 --- a/app/src/organisms/ChangePipette/__tests__/ClearDeckModal.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/ClearDeckModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/ChangePipette/__tests__/ConfirmPipette.test.tsx b/app/src/organisms/ChangePipette/__tests__/ConfirmPipette.test.tsx index b2ddff2791f..a328df38383 100644 --- a/app/src/organisms/ChangePipette/__tests__/ConfirmPipette.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/ConfirmPipette.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect } from 'vitest' diff --git a/app/src/organisms/ChangePipette/__tests__/ExitModal.test.tsx b/app/src/organisms/ChangePipette/__tests__/ExitModal.test.tsx index f7438b1874c..29bf417071c 100644 --- a/app/src/organisms/ChangePipette/__tests__/ExitModal.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/ExitModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/ChangePipette/__tests__/InstructionStep.test.tsx b/app/src/organisms/ChangePipette/__tests__/InstructionStep.test.tsx index 33e390ad1f4..80cdde63972 100644 --- a/app/src/organisms/ChangePipette/__tests__/InstructionStep.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/InstructionStep.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ChangePipette/__tests__/Instructions.test.tsx b/app/src/organisms/ChangePipette/__tests__/Instructions.test.tsx index c169f5f0960..024be58e798 100644 --- a/app/src/organisms/ChangePipette/__tests__/Instructions.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/Instructions.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ChangePipette/__tests__/LevelPipette.test.tsx b/app/src/organisms/ChangePipette/__tests__/LevelPipette.test.tsx index 40edcf61260..78c2e9f8d6d 100644 --- a/app/src/organisms/ChangePipette/__tests__/LevelPipette.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/LevelPipette.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ChangePipette/__tests__/PipetteSelection.test.tsx b/app/src/organisms/ChangePipette/__tests__/PipetteSelection.test.tsx index 1048e265fae..f3619e9930d 100644 --- a/app/src/organisms/ChangePipette/__tests__/PipetteSelection.test.tsx +++ b/app/src/organisms/ChangePipette/__tests__/PipetteSelection.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ChangePipette/index.tsx b/app/src/organisms/ChangePipette/index.tsx index afa694e9992..efcca7d7a35 100644 --- a/app/src/organisms/ChangePipette/index.tsx +++ b/app/src/organisms/ChangePipette/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect, useCallback } from 'react' import capitalize from 'lodash/capitalize' import { useSelector, useDispatch } from 'react-redux' import { useNavigate } from 'react-router-dom' @@ -63,7 +63,7 @@ export function ChangePipette(props: Props): JSX.Element | null { const { t } = useTranslation(['change_pipette', 'shared']) const navigate = useNavigate() const dispatch = useDispatch() - const finalRequestId = React.useRef(null) + const finalRequestId = useRef(null) const [dispatchApiRequests] = useDispatchApiRequests(dispatchedAction => { if ( dispatchedAction.type === HOME && @@ -74,10 +74,10 @@ export function ChangePipette(props: Props): JSX.Element | null { finalRequestId.current = dispatchedAction.meta.requestId } }) - const [wizardStep, setWizardStep] = React.useState(CLEAR_DECK) - const [wantedName, setWantedName] = React.useState(null) - const [confirmExit, setConfirmExit] = React.useState(false) - const [currentStepCount, setCurrentStepCount] = React.useState(0) + const [wizardStep, setWizardStep] = useState(CLEAR_DECK) + const [wantedName, setWantedName] = useState(null) + const [confirmExit, setConfirmExit] = useState(false) + const [currentStepCount, setCurrentStepCount] = useState(0) // @ts-expect-error(sa, 2021-05-27): avoiding src code change, use in operator to type narrow const wantedPipette = wantedName ? getPipetteNameSpecs(wantedName) : null const attachedPipette = useAttachedPipettes()[mount] @@ -90,10 +90,8 @@ export function ChangePipette(props: Props): JSX.Element | null { const [ wrongWantedPipette, setWrongWantedPipette, - ] = React.useState(wantedPipette) - const [confirmPipetteLevel, setConfirmPipetteLevel] = React.useState( - false - ) + ] = useState(wantedPipette) + const [confirmPipetteLevel, setConfirmPipetteLevel] = useState(false) const movementStatus = useSelector((state: State) => { return getMovementStatus(state, robotName) @@ -105,11 +103,11 @@ export function ChangePipette(props: Props): JSX.Element | null { : null })?.status - React.useEffect(() => { + useEffect(() => { if (homePipStatus === SUCCESS) closeModal() }, [homePipStatus, closeModal]) - const homePipAndExit = React.useCallback(() => { + const homePipAndExit = useCallback(() => { dispatchApiRequests(home(robotName, PIPETTE, mount)) }, [dispatchApiRequests, robotName, mount]) diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationHealthCheckResults.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationHealthCheckResults.tsx index f105a212ecc..957a91fb0eb 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationHealthCheckResults.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationHealthCheckResults.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationResult.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationResult.tsx index 9fd0252cc28..6d060e30b72 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationResult.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/CalibrationResult.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/RenderMountInformation.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/RenderMountInformation.tsx index f93c62acdf6..fb79709cf33 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/RenderMountInformation.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/RenderMountInformation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/RenderResult.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/RenderResult.tsx index 9f6fbe5e548..78c8f4e93d2 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/RenderResult.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/RenderResult.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationHealthCheckResults.test.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationHealthCheckResults.test.tsx index 08e930a1391..dbe7c8349a0 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationHealthCheckResults.test.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationHealthCheckResults.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationResult.test.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationResult.test.tsx index 9004462430a..70432556944 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationResult.test.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/CalibrationResult.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderMountInformation.test.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderMountInformation.test.tsx index 1915e0ae711..bae133b6522 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderMountInformation.test.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderMountInformation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderResult.test.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderResult.test.tsx index 1fb708f81ba..90ed47fc126 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderResult.test.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/RenderResult.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/ResultsSummary.test.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/ResultsSummary.test.tsx index 3f3ad46b7f1..5ec0334fdb5 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/ResultsSummary.test.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/__tests__/ResultsSummary.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { saveAs } from 'file-saver' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/CheckCalibration/ResultsSummary/index.tsx b/app/src/organisms/CheckCalibration/ResultsSummary/index.tsx index 06aec08bec3..e7d7e79c57e 100644 --- a/app/src/organisms/CheckCalibration/ResultsSummary/index.tsx +++ b/app/src/organisms/CheckCalibration/ResultsSummary/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { saveAs } from 'file-saver' diff --git a/app/src/organisms/CheckCalibration/ReturnTip.tsx b/app/src/organisms/CheckCalibration/ReturnTip.tsx index 02a9963be89..c90c8ec1a7a 100644 --- a/app/src/organisms/CheckCalibration/ReturnTip.tsx +++ b/app/src/organisms/CheckCalibration/ReturnTip.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_STRETCH, DIRECTION_COLUMN, diff --git a/app/src/organisms/CheckCalibration/ThresholdValue.tsx b/app/src/organisms/CheckCalibration/ThresholdValue.tsx index 4ff957fbb47..383f3f4ed31 100644 --- a/app/src/organisms/CheckCalibration/ThresholdValue.tsx +++ b/app/src/organisms/CheckCalibration/ThresholdValue.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - interface Props { thresholdVector: [number, number, number] } diff --git a/app/src/organisms/CheckCalibration/__tests__/CheckCalibration.test.tsx b/app/src/organisms/CheckCalibration/__tests__/CheckCalibration.test.tsx index 47ee094592f..d5f5a9814d7 100644 --- a/app/src/organisms/CheckCalibration/__tests__/CheckCalibration.test.tsx +++ b/app/src/organisms/CheckCalibration/__tests__/CheckCalibration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' diff --git a/app/src/organisms/ChildNavigation/__tests__/ChildNavigation.test.tsx b/app/src/organisms/ChildNavigation/__tests__/ChildNavigation.test.tsx index 6bf5654398b..82a0dfb0b3c 100644 --- a/app/src/organisms/ChildNavigation/__tests__/ChildNavigation.test.tsx +++ b/app/src/organisms/ChildNavigation/__tests__/ChildNavigation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/ChildNavigation/index.tsx b/app/src/organisms/ChildNavigation/index.tsx index 9c2b0596ab1..ea6c72f293b 100644 --- a/app/src/organisms/ChildNavigation/index.tsx +++ b/app/src/organisms/ChildNavigation/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled from 'styled-components' import { diff --git a/app/src/organisms/ChooseProtocolSlideout/__tests__/ChooseProtocolSlideout.test.tsx b/app/src/organisms/ChooseProtocolSlideout/__tests__/ChooseProtocolSlideout.test.tsx index 89ae868022a..a31c6a8236b 100644 --- a/app/src/organisms/ChooseProtocolSlideout/__tests__/ChooseProtocolSlideout.test.tsx +++ b/app/src/organisms/ChooseProtocolSlideout/__tests__/ChooseProtocolSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ChooseRobotSlideout/FileCard.tsx b/app/src/organisms/ChooseRobotSlideout/FileCard.tsx index 0ed23c4aa2f..e21e806c5cb 100644 --- a/app/src/organisms/ChooseRobotSlideout/FileCard.tsx +++ b/app/src/organisms/ChooseRobotSlideout/FileCard.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/organisms/ChooseRobotSlideout/__tests__/ChooseRobotSlideout.test.tsx b/app/src/organisms/ChooseRobotSlideout/__tests__/ChooseRobotSlideout.test.tsx index b9c3eab323c..998c82462bc 100644 --- a/app/src/organisms/ChooseRobotSlideout/__tests__/ChooseRobotSlideout.test.tsx +++ b/app/src/organisms/ChooseRobotSlideout/__tests__/ChooseRobotSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/organisms/ChooseRobotSlideout/__tests__/FileCard.test.tsx b/app/src/organisms/ChooseRobotSlideout/__tests__/FileCard.test.tsx index eefe4f96241..9a151cd1704 100644 --- a/app/src/organisms/ChooseRobotSlideout/__tests__/FileCard.test.tsx +++ b/app/src/organisms/ChooseRobotSlideout/__tests__/FileCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ChooseRobotSlideout/index.tsx b/app/src/organisms/ChooseRobotSlideout/index.tsx index 521405f0b42..1362e097a5b 100644 --- a/app/src/organisms/ChooseRobotSlideout/index.tsx +++ b/app/src/organisms/ChooseRobotSlideout/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useReducer, useEffect, Fragment } from 'react' import { useTranslation, Trans } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import { NavLink } from 'react-router-dom' @@ -162,8 +162,8 @@ export function ChooseRobotSlideout( const [ showRestoreValuesTooltip, setShowRestoreValuesTooltip, - ] = React.useState(false) - const [isInputFocused, setIsInputFocused] = React.useState(false) + ] = useState(false) + const [isInputFocused, setIsInputFocused] = useState(false) const unhealthyReachableRobots = useSelector((state: State) => getReachableRobots(state) @@ -199,7 +199,7 @@ export function ChooseRobotSlideout( } }) - const [robotBusyStatusByName, registerRobotBusyStatus] = React.useReducer( + const [robotBusyStatusByName, registerRobotBusyStatus] = useReducer( robotBusyStatusByNameReducer, {} ) @@ -212,7 +212,7 @@ export function ChooseRobotSlideout( ).length // this useEffect sets the default selection to the first robot in the list. state is managed by the caller - React.useEffect(() => { + useEffect(() => { if ( (selectedRobot == null || !reducerAvailableRobots.some( @@ -284,7 +284,7 @@ export function ChooseRobotSlideout( const isSelected = selectedRobot != null && selectedRobot.ip === robot.ip return ( - + { @@ -331,7 +331,7 @@ export function ChooseRobotSlideout( )} )} - + ) }) )} diff --git a/app/src/organisms/ChooseRobotToRunProtocolSlideout/__tests__/ChooseRobotToRunProtocolSlideout.test.tsx b/app/src/organisms/ChooseRobotToRunProtocolSlideout/__tests__/ChooseRobotToRunProtocolSlideout.test.tsx index 068cd0825f0..95e15dfcb77 100644 --- a/app/src/organisms/ChooseRobotToRunProtocolSlideout/__tests__/ChooseRobotToRunProtocolSlideout.test.tsx +++ b/app/src/organisms/ChooseRobotToRunProtocolSlideout/__tests__/ChooseRobotToRunProtocolSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ConfigurePipette/ConfigErrorBanner.tsx b/app/src/organisms/ConfigurePipette/ConfigErrorBanner.tsx index 35aac004632..5a7ea72ae7e 100644 --- a/app/src/organisms/ConfigurePipette/ConfigErrorBanner.tsx +++ b/app/src/organisms/ConfigurePipette/ConfigErrorBanner.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { AlertItem } from '@opentrons/components' import styles from './styles.module.css' @@ -10,7 +10,7 @@ const TITLE = 'Error updating pipette settings' export function ConfigErrorBanner(props: Props): JSX.Element | null { const { message } = props - const [dismissed, setDismissed] = React.useState(false) + const [dismissed, setDismissed] = useState(false) if (message == null || dismissed) return null return ( diff --git a/app/src/organisms/ConfigurePipette/ConfigForm.tsx b/app/src/organisms/ConfigurePipette/ConfigForm.tsx index acc2c943cb9..6cd5691db1e 100644 --- a/app/src/organisms/ConfigurePipette/ConfigForm.tsx +++ b/app/src/organisms/ConfigurePipette/ConfigForm.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import startCase from 'lodash/startCase' import mapValues from 'lodash/mapValues' import forOwn from 'lodash/forOwn' diff --git a/app/src/organisms/ConfigurePipette/ConfigFormGroup.tsx b/app/src/organisms/ConfigurePipette/ConfigFormGroup.tsx index a7f75904ae3..9c8a2c25acf 100644 --- a/app/src/organisms/ConfigurePipette/ConfigFormGroup.tsx +++ b/app/src/organisms/ConfigurePipette/ConfigFormGroup.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Controller } from 'react-hook-form' import { CheckboxField, diff --git a/app/src/organisms/ConfigurePipette/ConfigFormResetButton.tsx b/app/src/organisms/ConfigurePipette/ConfigFormResetButton.tsx index 8d640e89bda..3d31d8b7bab 100644 --- a/app/src/organisms/ConfigurePipette/ConfigFormResetButton.tsx +++ b/app/src/organisms/ConfigurePipette/ConfigFormResetButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/ConfigurePipette/ConfigFormSubmitButton.tsx b/app/src/organisms/ConfigurePipette/ConfigFormSubmitButton.tsx index cc608f40e85..97335e736a3 100644 --- a/app/src/organisms/ConfigurePipette/ConfigFormSubmitButton.tsx +++ b/app/src/organisms/ConfigurePipette/ConfigFormSubmitButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/ConfigurePipette/ConfigMessage.tsx b/app/src/organisms/ConfigurePipette/ConfigMessage.tsx index d55c2b96c36..d6a32fa6d4b 100644 --- a/app/src/organisms/ConfigurePipette/ConfigMessage.tsx +++ b/app/src/organisms/ConfigurePipette/ConfigMessage.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styles from './styles.module.css' // TODO (ka 2019-2-12): Add intercom onClick to assistance text diff --git a/app/src/organisms/ConfigurePipette/__tests__/ConfigFormResetButton.test.tsx b/app/src/organisms/ConfigurePipette/__tests__/ConfigFormResetButton.test.tsx index bcec76bc2ea..4c2ec08c7d4 100644 --- a/app/src/organisms/ConfigurePipette/__tests__/ConfigFormResetButton.test.tsx +++ b/app/src/organisms/ConfigurePipette/__tests__/ConfigFormResetButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, expect, describe, beforeEach } from 'vitest' diff --git a/app/src/organisms/ConfigurePipette/__tests__/ConfigFormSubmitButton.test.tsx b/app/src/organisms/ConfigurePipette/__tests__/ConfigFormSubmitButton.test.tsx index 3a10eb988f0..3dbab681883 100644 --- a/app/src/organisms/ConfigurePipette/__tests__/ConfigFormSubmitButton.test.tsx +++ b/app/src/organisms/ConfigurePipette/__tests__/ConfigFormSubmitButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, expect, describe, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ConfigurePipette/__tests__/ConfigurePipette.test.tsx b/app/src/organisms/ConfigurePipette/__tests__/ConfigurePipette.test.tsx index e3e37a76ff0..2d7790bdd24 100644 --- a/app/src/organisms/ConfigurePipette/__tests__/ConfigurePipette.test.tsx +++ b/app/src/organisms/ConfigurePipette/__tests__/ConfigurePipette.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { vi, it, expect, describe, beforeEach } from 'vitest' diff --git a/app/src/organisms/ConfigurePipette/index.tsx b/app/src/organisms/ConfigurePipette/index.tsx index 326f9e5792e..62a90721b26 100644 --- a/app/src/organisms/ConfigurePipette/index.tsx +++ b/app/src/organisms/ConfigurePipette/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Box } from '@opentrons/components' diff --git a/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/__tests__/AddCustomLabwareSlideout.test.tsx b/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/__tests__/AddCustomLabwareSlideout.test.tsx index 451e63491fd..977f44f2cce 100644 --- a/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/__tests__/AddCustomLabwareSlideout.test.tsx +++ b/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/__tests__/AddCustomLabwareSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/index.tsx b/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/index.tsx index b6bebd77fdd..1ded9827380 100644 --- a/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/index.tsx +++ b/app/src/organisms/Desktop/Labware/AddCustomLabwareSlideout/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation, Trans } from 'react-i18next' import { diff --git a/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/CustomLabwareOverflowMenu.test.tsx b/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/CustomLabwareOverflowMenu.test.tsx index d96be28d824..588b47ecea3 100644 --- a/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/CustomLabwareOverflowMenu.test.tsx +++ b/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/CustomLabwareOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest' diff --git a/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/LabwareCard.test.tsx b/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/LabwareCard.test.tsx index 35423948e56..76abb51c72f 100644 --- a/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/LabwareCard.test.tsx +++ b/app/src/organisms/Desktop/Labware/LabwareCard/__tests__/LabwareCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' import { renderWithProviders, nestedTextMatcher } from '/app/__testing-utils__' diff --git a/app/src/organisms/Desktop/Labware/LabwareCard/index.tsx b/app/src/organisms/Desktop/Labware/LabwareCard/index.tsx index b94f088d87a..6d445b4bbd5 100644 --- a/app/src/organisms/Desktop/Labware/LabwareCard/index.tsx +++ b/app/src/organisms/Desktop/Labware/LabwareCard/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import startCase from 'lodash/startCase' import { format } from 'date-fns' diff --git a/app/src/organisms/Desktop/Labware/LabwareDetails/Dimensions.tsx b/app/src/organisms/Desktop/Labware/LabwareDetails/Dimensions.tsx index 61e3cd422d5..ad08946ea42 100644 --- a/app/src/organisms/Desktop/Labware/LabwareDetails/Dimensions.tsx +++ b/app/src/organisms/Desktop/Labware/LabwareDetails/Dimensions.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import round from 'lodash/round' import { Box, SPACING, getFootprintDiagram } from '@opentrons/components' diff --git a/app/src/organisms/Desktop/Labware/LabwareDetails/Gallery.tsx b/app/src/organisms/Desktop/Labware/LabwareDetails/Gallery.tsx index ca5f7b89de6..ed418218147 100644 --- a/app/src/organisms/Desktop/Labware/LabwareDetails/Gallery.tsx +++ b/app/src/organisms/Desktop/Labware/LabwareDetails/Gallery.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { Box, @@ -34,7 +34,7 @@ export function Gallery(props: GalleryProps): JSX.Element { ? 127.4 : dims.xDimension - const [currentImage, setCurrentImage] = React.useState(0) + const [currentImage, setCurrentImage] = useState(0) const render = ( 1 const isMultiRow = ordering.some(row => row.length > 1) const isCustomDefinition = definition.namespace !== 'opentrons' - const [showToolTip, setShowToolTip] = React.useState(false) + const [showToolTip, setShowToolTip] = useState(false) const [targetProps, tooltipProps] = useHoverTooltip({ placement: TOOLTIP_TOP_START, }) @@ -88,7 +88,7 @@ export function LabwareDetails(props: LabwareDetailsProps): JSX.Element { setShowToolTip(true) } - React.useEffect(() => { + useEffect(() => { const timer = setTimeout(() => { setShowToolTip(false) }, 2000) @@ -216,7 +216,7 @@ export function LabwareDetails(props: LabwareDetailsProps): JSX.Element { : '' return ( - + {groupMetadata.displayCategory == null && irregular && ( <> - + ) })} diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.stories.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.stories.tsx index de7c062f9d1..f14c6d46e96 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.stories.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/AddFixtureModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { VIEWPORT } from '@opentrons/components' import { AddFixtureModal } from './AddFixtureModal' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.stories.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.stories.tsx index 0fdee52a94e..971950f222c 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.stories.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { VIEWPORT } from '@opentrons/components' import { DeckConfigurationDiscardChangesModal } from './DeckConfigurationDiscardChangesModal' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.tsx index 9e803032b2d..bdf8339de71 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/DeckConfigurationDiscardChangesModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/DeckFixtureSetupInstructionsModal.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/DeckFixtureSetupInstructionsModal.tsx index 8f7f72c3433..cfda966a3c1 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/DeckFixtureSetupInstructionsModal.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/DeckFixtureSetupInstructionsModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_FLEX_END, diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/TouchScreenDeckFixtureSetupInstructionModal.stories.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/TouchScreenDeckFixtureSetupInstructionModal.stories.tsx index ec078d74eea..09586ea57f2 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/TouchScreenDeckFixtureSetupInstructionModal.stories.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/TouchScreenDeckFixtureSetupInstructionModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { VIEWPORT } from '@opentrons/components' import { DeckFixtureSetupInstructionsModal } from './DeckFixtureSetupInstructionsModal' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/AddFixtureModal.test.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/AddFixtureModal.test.tsx index 3834d80f839..450a64cc0e6 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/AddFixtureModal.test.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/AddFixtureModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect, afterEach } from 'vitest' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckConfigurationDiscardChangesModal.test.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckConfigurationDiscardChangesModal.test.tsx index 538ee899f46..fd0e56ffa4d 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckConfigurationDiscardChangesModal.test.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckConfigurationDiscardChangesModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckFixtureSetupInstructionsModal.test.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckFixtureSetupInstructionsModal.test.tsx index 611f34b2600..ddc9ff33194 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckFixtureSetupInstructionsModal.test.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeckFixtureSetupInstructionsModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeviceDetailsDeckConfiguration.test.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeviceDetailsDeckConfiguration.test.tsx index 731639882e8..dc47261fac8 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeviceDetailsDeckConfiguration.test.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/__tests__/DeviceDetailsDeckConfiguration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' import { describe, it, beforeEach, vi, afterEach } from 'vitest' diff --git a/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx b/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx index 98fc9a0f31c..da66506191c 100644 --- a/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx +++ b/app/src/organisms/DeviceDetailsDeckConfiguration/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' @@ -58,7 +58,7 @@ export function DeviceDetailsDeckConfiguration({ const [ showSetupInstructionsModal, setShowSetupInstructionsModal, - ] = React.useState(false) + ] = useState(false) const { data: modulesData } = useModulesQuery() const deckConfig = diff --git a/app/src/organisms/Devices/CalibrationStatusBanner.tsx b/app/src/organisms/Devices/CalibrationStatusBanner.tsx index e1a305e3d58..e601ea19799 100644 --- a/app/src/organisms/Devices/CalibrationStatusBanner.tsx +++ b/app/src/organisms/Devices/CalibrationStatusBanner.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Link as RouterLink } from 'react-router-dom' diff --git a/app/src/organisms/Devices/ConnectionTroubleshootingModal.tsx b/app/src/organisms/Devices/ConnectionTroubleshootingModal.tsx index c6289ead522..1587524abae 100644 --- a/app/src/organisms/Devices/ConnectionTroubleshootingModal.tsx +++ b/app/src/organisms/Devices/ConnectionTroubleshootingModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/app/src/organisms/Devices/DevicesEmptyState.tsx b/app/src/organisms/Devices/DevicesEmptyState.tsx index 95ec5f8af2c..f542fb2f979 100644 --- a/app/src/organisms/Devices/DevicesEmptyState.tsx +++ b/app/src/organisms/Devices/DevicesEmptyState.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' diff --git a/app/src/organisms/Devices/DownloadCsvFileLink.tsx b/app/src/organisms/Devices/DownloadCsvFileLink.tsx index 4975db0ce11..e2ab564c0c8 100644 --- a/app/src/organisms/Devices/DownloadCsvFileLink.tsx +++ b/app/src/organisms/Devices/DownloadCsvFileLink.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/EstopBanner.tsx b/app/src/organisms/Devices/EstopBanner.tsx index 2a88b56bf89..3573bd67d59 100644 --- a/app/src/organisms/Devices/EstopBanner.tsx +++ b/app/src/organisms/Devices/EstopBanner.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Btn, diff --git a/app/src/organisms/Devices/HistoricalProtocolRun.tsx b/app/src/organisms/Devices/HistoricalProtocolRun.tsx index c094404d391..1ec488cfc45 100644 --- a/app/src/organisms/Devices/HistoricalProtocolRun.tsx +++ b/app/src/organisms/Devices/HistoricalProtocolRun.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { @@ -40,7 +40,7 @@ export function HistoricalProtocolRun( ): JSX.Element | null { const { t } = useTranslation('run_details') const { run, protocolName, robotIsBusy, robotName, protocolKey } = props - const [drawerOpen, setDrawerOpen] = React.useState(false) + const [drawerOpen, setDrawerOpen] = useState(false) const countRunDataFiles = 'runTimeParameters' in run ? run?.runTimeParameters.filter( diff --git a/app/src/organisms/Devices/HistoricalProtocolRunDrawer.tsx b/app/src/organisms/Devices/HistoricalProtocolRunDrawer.tsx index 691af54074d..6533895bb1e 100644 --- a/app/src/organisms/Devices/HistoricalProtocolRunDrawer.tsx +++ b/app/src/organisms/Devices/HistoricalProtocolRunDrawer.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { format } from 'date-fns' import isEqual from 'lodash/isEqual' diff --git a/app/src/organisms/Devices/HistoricalProtocolRunOverflowMenu.tsx b/app/src/organisms/Devices/HistoricalProtocolRunOverflowMenu.tsx index a793b2c30b0..9fea6021603 100644 --- a/app/src/organisms/Devices/HistoricalProtocolRunOverflowMenu.tsx +++ b/app/src/organisms/Devices/HistoricalProtocolRunOverflowMenu.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { NavLink, useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/Devices/InstrumentsAndModules.tsx b/app/src/organisms/Devices/InstrumentsAndModules.tsx index 2a9cdfbbb3f..e5062d50881 100644 --- a/app/src/organisms/Devices/InstrumentsAndModules.tsx +++ b/app/src/organisms/Devices/InstrumentsAndModules.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { getPipetteModelSpecs, LEFT, RIGHT } from '@opentrons/shared-data' import { diff --git a/app/src/organisms/Devices/PipetteCard/AboutPipetteSlideout.tsx b/app/src/organisms/Devices/PipetteCard/AboutPipetteSlideout.tsx index 304d7be4b23..a8588a00778 100644 --- a/app/src/organisms/Devices/PipetteCard/AboutPipetteSlideout.tsx +++ b/app/src/organisms/Devices/PipetteCard/AboutPipetteSlideout.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { COLORS, diff --git a/app/src/organisms/Devices/PipetteCard/PipetteOverflowMenu.tsx b/app/src/organisms/Devices/PipetteCard/PipetteOverflowMenu.tsx index da8656dae94..58fc6aca8f0 100644 --- a/app/src/organisms/Devices/PipetteCard/PipetteOverflowMenu.tsx +++ b/app/src/organisms/Devices/PipetteCard/PipetteOverflowMenu.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/PipetteCard/PipetteRecalibrationWarning.tsx b/app/src/organisms/Devices/PipetteCard/PipetteRecalibrationWarning.tsx index 0007328b315..10fcee0f08c 100644 --- a/app/src/organisms/Devices/PipetteCard/PipetteRecalibrationWarning.tsx +++ b/app/src/organisms/Devices/PipetteCard/PipetteRecalibrationWarning.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { Box, @@ -12,7 +12,7 @@ import { export const PipetteRecalibrationWarning = (): JSX.Element | null => { const { t } = useTranslation('device_details') - const [showBanner, setShowBanner] = React.useState(true) + const [showBanner, setShowBanner] = useState(true) if (!showBanner) return null return ( diff --git a/app/src/organisms/Devices/PipetteCard/PipetteSettingsSlideout.tsx b/app/src/organisms/Devices/PipetteCard/PipetteSettingsSlideout.tsx index 9b6cdff72a7..6b004085284 100644 --- a/app/src/organisms/Devices/PipetteCard/PipetteSettingsSlideout.tsx +++ b/app/src/organisms/Devices/PipetteCard/PipetteSettingsSlideout.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Flex } from '@opentrons/components' import { useUpdatePipetteSettingsMutation } from '@opentrons/react-api-client' diff --git a/app/src/organisms/Devices/PipetteCard/__tests__/AboutPipetteSlideout.test.tsx b/app/src/organisms/Devices/PipetteCard/__tests__/AboutPipetteSlideout.test.tsx index 84d9fef2a9f..dd2274a3ab3 100644 --- a/app/src/organisms/Devices/PipetteCard/__tests__/AboutPipetteSlideout.test.tsx +++ b/app/src/organisms/Devices/PipetteCard/__tests__/AboutPipetteSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/Devices/PipetteCard/__tests__/FlexPipetteCard.test.tsx b/app/src/organisms/Devices/PipetteCard/__tests__/FlexPipetteCard.test.tsx index b10a0d2f446..f2b62b12efc 100644 --- a/app/src/organisms/Devices/PipetteCard/__tests__/FlexPipetteCard.test.tsx +++ b/app/src/organisms/Devices/PipetteCard/__tests__/FlexPipetteCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, afterEach, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/Devices/PipetteCard/__tests__/PipetteCard.test.tsx b/app/src/organisms/Devices/PipetteCard/__tests__/PipetteCard.test.tsx index 91380e8d7aa..752a91eb502 100644 --- a/app/src/organisms/Devices/PipetteCard/__tests__/PipetteCard.test.tsx +++ b/app/src/organisms/Devices/PipetteCard/__tests__/PipetteCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/PipetteCard/__tests__/PipetteOverflowMenu.test.tsx b/app/src/organisms/Devices/PipetteCard/__tests__/PipetteOverflowMenu.test.tsx index 36eddad5674..155d955b6ea 100644 --- a/app/src/organisms/Devices/PipetteCard/__tests__/PipetteOverflowMenu.test.tsx +++ b/app/src/organisms/Devices/PipetteCard/__tests__/PipetteOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/PipetteCard/__tests__/PipetteSettingsSlideout.test.tsx b/app/src/organisms/Devices/PipetteCard/__tests__/PipetteSettingsSlideout.test.tsx index a1b0cdaa7ec..37b6f66b863 100644 --- a/app/src/organisms/Devices/PipetteCard/__tests__/PipetteSettingsSlideout.test.tsx +++ b/app/src/organisms/Devices/PipetteCard/__tests__/PipetteSettingsSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, waitFor, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/PipetteCard/index.tsx b/app/src/organisms/Devices/PipetteCard/index.tsx index 3e031da68e7..fa2da081457 100644 --- a/app/src/organisms/Devices/PipetteCard/index.tsx +++ b/app/src/organisms/Devices/PipetteCard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { @@ -68,9 +68,9 @@ export const PipetteCard = (props: PipetteCardProps): JSX.Element => { setShowOverflowMenu(false) }, }) - const [showChangePipette, setChangePipette] = React.useState(false) - const [showSlideout, setShowSlideout] = React.useState(false) - const [showAboutSlideout, setShowAboutSlideout] = React.useState(false) + const [showChangePipette, setChangePipette] = useState(false) + const [showSlideout, setShowSlideout] = useState(false) + const [showAboutSlideout, setShowAboutSlideout] = useState(false) const { showDTWiz, toggleDTWiz } = useDropTipWizardFlows() diff --git a/app/src/organisms/Devices/ProtocolRun/BackToTopButton.tsx b/app/src/organisms/Devices/ProtocolRun/BackToTopButton.tsx index 385d6537272..a8524988bf2 100644 --- a/app/src/organisms/Devices/ProtocolRun/BackToTopButton.tsx +++ b/app/src/organisms/Devices/ProtocolRun/BackToTopButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' import { useRobot } from '/app/redux-resources/robots' diff --git a/app/src/organisms/Devices/ProtocolRun/EmptySetupStep.tsx b/app/src/organisms/Devices/ProtocolRun/EmptySetupStep.tsx index eeca6dcf81a..24c2b449083 100644 --- a/app/src/organisms/Devices/ProtocolRun/EmptySetupStep.tsx +++ b/app/src/organisms/Devices/ProtocolRun/EmptySetupStep.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { COLORS, DIRECTION_COLUMN, diff --git a/app/src/organisms/Devices/ProtocolRun/LabwareInfoOverlay.tsx b/app/src/organisms/Devices/ProtocolRun/LabwareInfoOverlay.tsx index 1dc1b9526cb..c2d868af33f 100644 --- a/app/src/organisms/Devices/ProtocolRun/LabwareInfoOverlay.tsx +++ b/app/src/organisms/Devices/ProtocolRun/LabwareInfoOverlay.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { getLabwareDisplayName } from '@opentrons/shared-data' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/DisplayRunStatus.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/DisplayRunStatus.tsx index 70b388ec3ca..5b5624ffb4e 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/DisplayRunStatus.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/DisplayRunStatus.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/TerminalRunBannerContainer.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/TerminalRunBannerContainer.tsx index 6116f4be3b1..c6428c2f385 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/TerminalRunBannerContainer.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/TerminalRunBannerContainer.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/__tests__/ProtocolAnalysisErrorBanner.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/__tests__/ProtocolAnalysisErrorBanner.test.tsx index 169dee8958a..5b60de044d7 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/__tests__/ProtocolAnalysisErrorBanner.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/__tests__/ProtocolAnalysisErrorBanner.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/index.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/index.tsx index 48a26bf1b85..5a14054d98d 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/index.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderBannerContainer/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Box, SPACING, Banner } from '@opentrons/components' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/ActionButton/index.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/ActionButton/index.tsx index 8b27662cb17..4b8c0f68076 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/ActionButton/index.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/ActionButton/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { RUN_STATUS_STOP_REQUESTED } from '@opentrons/api-client' import { diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/LabeledValue.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/LabeledValue.tsx index 0d839adbc93..135dd72bbae 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/LabeledValue.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/LabeledValue.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionLower.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionLower.tsx index 3e3c9853942..d7757cd4fe9 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionLower.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionLower.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionUpper.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionUpper.tsx index 6e3bc933901..ecbee666819 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionUpper.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/RunHeaderSectionUpper.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/index.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/index.tsx index bb5f1779ea3..b62c0701563 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/index.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderContent/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { RunHeaderSectionUpper } from './RunHeaderSectionUpper' import { RunHeaderSectionLower } from './RunHeaderSectionLower' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/RunHeaderModalContainer.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/RunHeaderModalContainer.tsx index 99f582e32ad..83be6db31ee 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/RunHeaderModalContainer.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/RunHeaderModalContainer.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { ErrorRecoveryFlows } from '../../../../ErrorRecoveryFlows' import { DropTipWizardFlows } from '../../../../DropTipWizardFlows' import { useMostRecentCompletedAnalysis } from '/app/resources/runs' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/hooks/useRunHeaderDropTip.ts b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/hooks/useRunHeaderDropTip.ts index 77f9c35ce8f..4138dca538b 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/hooks/useRunHeaderDropTip.ts +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/hooks/useRunHeaderDropTip.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useHost } from '@opentrons/react-api-client' import { RUN_STATUS_IDLE, RUN_STATUS_STOPPED } from '@opentrons/api-client' @@ -103,7 +103,7 @@ export function useRunHeaderDropTip({ } // Manage tip checking - React.useEffect(() => { + useEffect(() => { // If a user begins a new run without navigating away from the run page, reset tip status. if (robotType === FLEX_ROBOT_TYPE) { if (runStatus === RUN_STATUS_IDLE) { @@ -122,7 +122,7 @@ export function useRunHeaderDropTip({ // If the run terminates with a "stopped" status, close the run if no tips are attached after running tip check at least once. // This marks the robot as "not busy" if drop tip CTAs are unnecessary. - React.useEffect(() => { + useEffect(() => { if ( runStatus === RUN_STATUS_STOPPED && isRunCurrent && diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ConfirmMissingStepsModal.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ConfirmMissingStepsModal.tsx index 708f07b3789..978efdbab48 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ConfirmMissingStepsModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ConfirmMissingStepsModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerIsRunningModal.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerIsRunningModal.tsx index 2f372a35d44..1db32eb66b2 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerIsRunningModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerIsRunningModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useCreateLiveCommandMutation } from '@opentrons/react-api-client' @@ -34,7 +34,7 @@ export type UseHeaterShakerIsRunningModalResult = export function useHeaterShakerIsRunningModal( attachedModules: AttachedModule[] ): UseHeaterShakerIsRunningModalResult { - const [showIsShakingModal, setShowIsShakingModal] = React.useState(false) + const [showIsShakingModal, setShowIsShakingModal] = useState(false) const activeHeaterShaker = getActiveHeaterShaker(attachedModules) const isHeaterShakerInProtocol = useIsHeaterShakerInProtocol() diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerModuleCard.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerModuleCard.tsx index 8e2305926c6..ab12b127489 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerModuleCard.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/HeaterShakerModuleCard.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerIsRunningModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerIsRunningModal.test.tsx index 62da66f6aa3..03b59af1b57 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerIsRunningModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerIsRunningModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerModuleCard.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerModuleCard.test.tsx index b3ca63fb0c8..82b12033164 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerModuleCard.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/HeaterShakerModuleCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/hooks.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/hooks.test.tsx index 1f9f71bab6d..c5028c6a821 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/hooks.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/HeaterShakerIsRunningModal/__tests__/hooks.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { describe, it, vi, beforeEach, expect } from 'vitest' import { createStore } from 'redux' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolAnalysisErrorModal.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolAnalysisErrorModal.tsx index b05aa9be089..5a19c099a34 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolAnalysisErrorModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolAnalysisErrorModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' @@ -34,9 +34,9 @@ export function useProtocolAnalysisErrorsModal({ runId, }: UseAnalysisErrorsModalProps): UseAnalysisErrorsModalResult { const { analysisErrors } = useProtocolAnalysisErrors(runId) - const [showModal, setShowModal] = React.useState(false) + const [showModal, setShowModal] = useState(false) - React.useEffect(() => { + useEffect(() => { if (analysisErrors != null && analysisErrors?.length > 0) { setShowModal(true) } diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolDropTipModal.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolDropTipModal.tsx index b4bad8d9c8d..b475ea725e6 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolDropTipModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/ProtocolDropTipModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { Trans, useTranslation } from 'react-i18next' import { css } from 'styled-components' @@ -52,7 +52,7 @@ export function useProtocolDropTipModal({ onSkipAndHome, pipetteInfo, }: UseProtocolDropTipModalProps): UseProtocolDropTipModalResult { - const [showModal, setShowModal] = React.useState(areTipsAttached) + const [showModal, setShowModal] = useState(areTipsAttached) const { homePipettes, isHoming } = useHomePipettes({ pipetteInfo, @@ -62,7 +62,7 @@ export function useProtocolDropTipModal({ }) // Close the modal if a different app closes the run context. - React.useEffect(() => { + useEffect(() => { if (isRunCurrent && !isHoming) { setShowModal(areTipsAttached) } else if (!isRunCurrent) { diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ConfirmCancelModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ConfirmCancelModal.test.tsx index c12f6a150cf..c6421040e17 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ConfirmCancelModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ConfirmCancelModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolAnalysisErrorModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolAnalysisErrorModal.test.tsx index 06d462abd1a..44fcb0278ad 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolAnalysisErrorModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolAnalysisErrorModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, expect, vi } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolDropTipModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolDropTipModal.test.tsx index 613b888a27b..1d73cc5c1cf 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolDropTipModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/ProtocolDropTipModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach } from 'vitest' import { renderHook, act, screen, fireEvent } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/RunFailedModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/RunFailedModal.test.tsx index 8664ce55b85..d49875a0859 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/RunFailedModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderModalContainer/modals/__tests__/RunFailedModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi, expect, afterEach } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderProtocolName.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderProtocolName.tsx index 9e3addadbc2..f08a157bba9 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderProtocolName.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/RunHeaderProtocolName.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Link } from 'react-router-dom' import { diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/__tests__/ProtocolRunHeader.test.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/__tests__/ProtocolRunHeader.test.tsx index e06718390c6..f9996372b8a 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/__tests__/ProtocolRunHeader.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/__tests__/ProtocolRunHeader.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' import { useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/hooks/useRunAnalytics.ts b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/hooks/useRunAnalytics.ts index 896f432336c..31399cbc541 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/hooks/useRunAnalytics.ts +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunHeader/hooks/useRunAnalytics.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useRobotAnalyticsData, useTrackProtocolRunEvent, @@ -26,7 +26,7 @@ export function useRunAnalytics({ const runStatus = useRunStatus(runId) const isRunCurrent = useIsRunCurrent(runId) - React.useEffect(() => { + useEffect(() => { const areReportConditionsValid = isRunCurrent && runId != null && @@ -42,7 +42,7 @@ export function useRunAnalytics({ }, [runStatus, isRunCurrent, runId, robotAnalyticsData]) const { reportRecoveredRunResult } = useRecoveryAnalytics() - React.useEffect(() => { + useEffect(() => { if (isRunCurrent) { reportRecoveredRunResult(runStatus, enteredER) } diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunModuleControls.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunModuleControls.tsx index 99377f37b82..c92251cfea1 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunModuleControls.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunModuleControls.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useInstrumentsQuery } from '@opentrons/react-api-client' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters.tsx b/app/src/organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters.tsx index c1d0b3b8dfa..a284b044283 100644 --- a/app/src/organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters.tsx +++ b/app/src/organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupCalibrationItem.tsx b/app/src/organisms/Devices/ProtocolRun/SetupCalibrationItem.tsx index 7f07e090a68..8ac68de4ff1 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupCalibrationItem.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupCalibrationItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupDeckCalibration.tsx b/app/src/organisms/Devices/ProtocolRun/SetupDeckCalibration.tsx index 9b0dd34479f..3ec0a03e72c 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupDeckCalibration.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupDeckCalibration.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupFlexPipetteCalibrationItem.tsx b/app/src/organisms/Devices/ProtocolRun/SetupFlexPipetteCalibrationItem.tsx index 212553976d2..e78873c59fa 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupFlexPipetteCalibrationItem.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupFlexPipetteCalibrationItem.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { Flex, @@ -36,9 +36,7 @@ export function SetupFlexPipetteCalibrationItem({ instrumentsRefetch, }: SetupInstrumentCalibrationItemProps): JSX.Element | null { const { t } = useTranslation(['protocol_setup', 'devices_landing']) - const [showFlexPipetteFlow, setShowFlexPipetteFlow] = React.useState( - false - ) + const [showFlexPipetteFlow, setShowFlexPipetteFlow] = useState(false) const { data: attachedInstruments } = useInstrumentsQuery() const mostRecentAnalysis = useMostRecentCompletedAnalysis(runId) const storedProtocolAnalysis = useStoredProtocolAnalysis(runId) diff --git a/app/src/organisms/Devices/ProtocolRun/SetupGripperCalibrationItem.tsx b/app/src/organisms/Devices/ProtocolRun/SetupGripperCalibrationItem.tsx index 3f75520fcff..1eb23ba091d 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupGripperCalibrationItem.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupGripperCalibrationItem.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { Flex, @@ -31,7 +31,7 @@ export function SetupGripperCalibrationItem({ const [ openWizardFlowType, setOpenWizardFlowType, - ] = React.useState(null) + ] = useState(null) const gripperCalLastModified = gripperData != null diff --git a/app/src/organisms/Devices/ProtocolRun/SetupInstrumentCalibration.tsx b/app/src/organisms/Devices/ProtocolRun/SetupInstrumentCalibration.tsx index 011c09c4d7c..0ce395e0e46 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupInstrumentCalibration.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupInstrumentCalibration.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/CurrentOffsetsModal.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/CurrentOffsetsModal.tsx index 4bb40f1c715..c95923e4cb8 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/CurrentOffsetsModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/CurrentOffsetsModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx index 0d8fac23390..6269be78e83 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareListItem.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' @@ -97,11 +97,11 @@ export function LabwareListItem( const [ secureLabwareModalType, setSecureLabwareModalType, - ] = React.useState(null) + ] = useState(null) const labwareDisplayName = getLabwareDisplayName(definition) const { createLiveCommand } = useCreateLiveCommandMutation() - const [isLatchLoading, setIsLatchLoading] = React.useState(false) - const [isLatchClosed, setIsLatchClosed] = React.useState(false) + const [isLatchLoading, setIsLatchLoading] = useState(false) + const [isLatchClosed, setIsLatchClosed] = useState(false) let slotInfo: string | null = null diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/OffDeckLabwareList.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/OffDeckLabwareList.tsx index 9216a1274da..66853d79579 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/OffDeckLabwareList.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/OffDeckLabwareList.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { SPACING, TYPOGRAPHY, LegacyStyledText } from '@opentrons/components' import { LabwareListItem } from './LabwareListItem' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SecureLabwareModal.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SecureLabwareModal.tsx index d9d4ec14388..36c9101ad87 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SecureLabwareModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SecureLabwareModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import snakeCase from 'lodash/snakeCase' import { Trans, useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareList.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareList.tsx index 654c645db84..647f1543677 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareList.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareList.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx index feeedd8d7d9..0334496fd6b 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import map from 'lodash/map' import { @@ -44,10 +44,8 @@ export function SetupLabwareMap({ const [ labwareStackDetailsLabwareId, setLabwareStackDetailsLabwareId, - ] = React.useState(null) - const [hoverLabwareId, setHoverLabwareId] = React.useState( - null - ) + ] = useState(null) + const [hoverLabwareId, setHoverLabwareId] = useState(null) if (protocolAnalysis == null) return null diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/LabwareListItem.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/LabwareListItem.test.tsx index 81dcb59ecbf..822b4a41f5a 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/LabwareListItem.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/LabwareListItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect } from 'vitest' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/OffDeckLabwareList.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/OffDeckLabwareList.test.tsx index 163d7e8871b..29ec88b86b5 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/OffDeckLabwareList.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/OffDeckLabwareList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SecureLabwareModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SecureLabwareModal.test.tsx index d346c397d87..80147006dc1 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SecureLabwareModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SecureLabwareModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabware.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabware.test.tsx index c987307c617..9aa6b7cee22 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabware.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabware.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareList.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareList.test.tsx index f1993f5b1ed..85068d39a1b 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareList.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { describe, it, beforeEach, vi } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareMap.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareMap.test.tsx index 40311723ea2..832524b2e3b 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareMap.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/__tests__/SetupLabwareMap.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/index.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/index.tsx index e47514a4196..38963d79dda 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/index.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import map from 'lodash/map' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/CurrentOffsetsTable.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/CurrentOffsetsTable.tsx index 6ea34c38386..49ee315b25a 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/CurrentOffsetsTable.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/CurrentOffsetsTable.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/HowLPCWorksModal.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/HowLPCWorksModal.tsx index 55397d219eb..a674b98b7b2 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/HowLPCWorksModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/HowLPCWorksModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/CurrentOffsetsTable.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/CurrentOffsetsTable.test.tsx index db396b08a5a..009b303f70b 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/CurrentOffsetsTable.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/CurrentOffsetsTable.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi, expect, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/HowLPCWorksModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/HowLPCWorksModal.test.tsx index cb9224e132f..5dd3d15db69 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/HowLPCWorksModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/HowLPCWorksModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/SetupLabwarePositionCheck.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/SetupLabwarePositionCheck.test.tsx index 94ca33b92f8..104cdc64035 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/SetupLabwarePositionCheck.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/__tests__/SetupLabwarePositionCheck.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' import { screen, fireEvent } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/index.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/index.tsx index b16d1caa865..a1d6bdfc266 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/index.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabwarePositionCheck/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsList.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsList.tsx index 01f71909902..c362101df85 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsList.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' @@ -139,8 +139,8 @@ export function LiquidsListItem(props: LiquidsListItemProps): JSX.Element { isFlex, } = props const { t } = useTranslation('protocol_setup') - const [openItem, setOpenItem] = React.useState(false) - const [liquidDetailsLabwareId, setLiquidDetailsLabwareId] = React.useState< + const [openItem, setOpenItem] = useState(false) + const [liquidDetailsLabwareId, setLiquidDetailsLabwareId] = useState< string | null >(null) const commands = useMostRecentCompletedAnalysis(runId)?.commands diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsMap.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsMap.tsx index dded304e93b..5338a9ce055 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsMap.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/SetupLiquidsMap.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, Fragment } from 'react' import map from 'lodash/map' import isEmpty from 'lodash/isEmpty' @@ -43,8 +43,8 @@ export function SetupLiquidsMap( props: SetupLiquidsMapProps ): JSX.Element | null { const { runId, protocolAnalysis } = props - const [hoverLabwareId, setHoverLabwareId] = React.useState('') - const [liquidDetailsLabwareId, setLiquidDetailsLabwareId] = React.useState< + const [hoverLabwareId, setHoverLabwareId] = useState('') + const [liquidDetailsLabwareId, setLiquidDetailsLabwareId] = useState< string | null >(null) @@ -159,9 +159,7 @@ export function SetupLiquidsMap( ) const labwareHasLiquid = !isEmpty(wellFill) return ( - + { @@ -191,7 +189,7 @@ export function SetupLiquidsMap( labwareHasLiquid={labwareHasLiquid} /> - + ) } )} diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquids.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquids.test.tsx index ce2848ab841..097f30447ee 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquids.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquids.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi } from 'vitest' import { screen, fireEvent } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsList.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsList.test.tsx index d0ceeff2a7b..b9f2c60be0f 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsList.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' import { describe, it, beforeEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsMap.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsMap.test.tsx index f384bf40dd4..8aea91dbb34 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsMap.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/__tests__/SetupLiquidsMap.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/index.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/index.tsx index 3dcbbbe7e13..28a6f84e2d4 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLiquids/index.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLiquids/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { JUSTIFY_CENTER, diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/NotConfiguredModal.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/NotConfiguredModal.tsx index ca5151763fc..90a6f8d5a02 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/NotConfiguredModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/NotConfiguredModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useUpdateDeckConfigurationMutation } from '@opentrons/react-api-client' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/OT2MultipleModulesHelp.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/OT2MultipleModulesHelp.tsx index 5517e944a23..69386cf29d0 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/OT2MultipleModulesHelp.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/OT2MultipleModulesHelp.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { @@ -27,7 +27,7 @@ export function OT2MultipleModulesHelp(): JSX.Element { const [ showMultipleModulesModal, setShowMultipleModulesModal, - ] = React.useState(false) + ] = useState(false) const onCloseClick = (): void => { setShowMultipleModulesModal(false) diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx index da513270939..28043cc3e55 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { @@ -148,16 +148,15 @@ export function FixtureListItem({ const [ showLocationConflictModal, setShowLocationConflictModal, - ] = React.useState(false) - const [ - showNotConfiguredModal, - setShowNotConfiguredModal, - ] = React.useState(false) + ] = useState(false) + const [showNotConfiguredModal, setShowNotConfiguredModal] = useState( + false + ) const [ showSetupInstructionsModal, setShowSetupInstructionsModal, - ] = React.useState(false) + ] = useState(false) return ( <> diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesList.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesList.tsx index c20ae96974d..f5beab0cd02 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesList.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import map from 'lodash/map' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' @@ -171,21 +171,20 @@ export function ModulesListItem({ attachedModuleMatch != null ? t('module_connected') : t('module_not_connected') - const [ - showModuleSetupModal, - setShowModuleSetupModal, - ] = React.useState(false) + const [showModuleSetupModal, setShowModuleSetupModal] = useState( + false + ) const [ showLocationConflictModal, setShowLocationConflictModal, - ] = React.useState(false) + ] = useState(false) - const [showModuleWizard, setShowModuleWizard] = React.useState(false) + const [showModuleWizard, setShowModuleWizard] = useState(false) const { chainLiveCommands, isCommandMutationLoading } = useChainLiveCommands() const [ prepCommandErrorMessage, setPrepCommandErrorMessage, - ] = React.useState('') + ] = useState('') const handleCalibrateClick = (): void => { if (attachedModuleMatch != null) { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesMap.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesMap.tsx index 79392007cff..991549d9b62 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesMap.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupModulesMap.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { BaseDeck, Box, diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/UnMatchedModuleWarning.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/UnMatchedModuleWarning.tsx index 224053fa5eb..6ebc96dc3c8 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/UnMatchedModuleWarning.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/UnMatchedModuleWarning.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, @@ -11,7 +11,7 @@ import { export const UnMatchedModuleWarning = (): JSX.Element | null => { const { t } = useTranslation('protocol_setup') - const [showBanner, setShowBanner] = React.useState(true) + const [showBanner, setShowBanner] = useState(true) if (!showBanner) return null return ( diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/NotConfiguredModal.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/NotConfiguredModal.test.tsx index ff95c11cee6..9f371faaa64 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/NotConfiguredModal.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/NotConfiguredModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/OT2MultipleModulesHelp.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/OT2MultipleModulesHelp.test.tsx index 3689c8ce2b4..27efa17e029 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/OT2MultipleModulesHelp.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/OT2MultipleModulesHelp.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, beforeEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupFixtureList.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupFixtureList.test.tsx index cddc1bc2449..dd0236ac96d 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupFixtureList.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupFixtureList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesAndDeck.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesAndDeck.test.tsx index 95d97cb834a..21926d3c823 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesAndDeck.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesAndDeck.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { describe, it, beforeEach, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesList.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesList.test.tsx index 54f9fcc036a..3beea61588a 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesList.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen, waitFor } from '@testing-library/react' import { describe, it, beforeEach, expect, vi } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesMap.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesMap.test.tsx index 37ef3a8c8d7..2f9cc646f4e 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesMap.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/SetupModulesMap.test.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-argument */ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/UnMatchedModuleWarning.test.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/UnMatchedModuleWarning.test.tsx index ada660cd2c8..eb73c0955bf 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/UnMatchedModuleWarning.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/__tests__/UnMatchedModuleWarning.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/index.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/index.tsx index c585c8f7d3b..3d42a645853 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/index.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupPipetteCalibrationItem.tsx b/app/src/organisms/Devices/ProtocolRun/SetupPipetteCalibrationItem.tsx index a53bbfcaed3..f42066c77d0 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupPipetteCalibrationItem.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupPipetteCalibrationItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Link as RRDLink } from 'react-router-dom' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupRobotCalibration.tsx b/app/src/organisms/Devices/ProtocolRun/SetupRobotCalibration.tsx index a04d86fe0c2..90745500149 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupRobotCalibration.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupRobotCalibration.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupStep.tsx b/app/src/organisms/Devices/ProtocolRun/SetupStep.tsx index 4aefec39518..25f2baf1d64 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupStep.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupStep.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibration.tsx b/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibration.tsx index c79e2d82dab..c01b79c3a34 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibration.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibration.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useTranslation } from 'react-i18next' import { @@ -41,7 +41,7 @@ export function SetupTipLengthCalibration({ return null } else { return ( - + {pipetteInfo.tipRacksForPipette.map((tipRackInfo, index) => { const pipetteNotAttached = pipetteInfo.requestedPipetteMatch === 'incompatible' @@ -71,7 +71,7 @@ export function SetupTipLengthCalibration({ /> ) })} - + ) } })} diff --git a/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibrationButton.tsx b/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibrationButton.tsx index d80fcf8abf7..11a7d65655e 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibrationButton.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupTipLengthCalibrationButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/BackToTopButton.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/BackToTopButton.test.tsx index 8c2c3f79038..0293c0ae5b2 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/BackToTopButton.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/BackToTopButton.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/EmptySetupStep.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/EmptySetupStep.test.tsx index eee0f6fb90b..673d8b4806c 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/EmptySetupStep.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/EmptySetupStep.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { describe, it, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/LabwareInfoOverlay.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/LabwareInfoOverlay.test.tsx index 8e81a9f6cff..0198aa9e448 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/LabwareInfoOverlay.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/LabwareInfoOverlay.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunModuleControls.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunModuleControls.test.tsx index 33063704bf3..5dd1507f893 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunModuleControls.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunModuleControls.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { describe, it, beforeEach, vi, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunRuntimeParameters.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunRuntimeParameters.test.tsx index 1c919131412..59425f6ff6b 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunRuntimeParameters.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunRuntimeParameters.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, afterEach, expect } from 'vitest' import { screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx index fd7708a3bde..64aa0d094ae 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupCalibrationItem.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupCalibrationItem.test.tsx index 893ec445e35..e39e5d7c83c 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupCalibrationItem.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupCalibrationItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { when } from 'vitest-when' import { describe, it, beforeEach, vi, afterEach } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupDeckCalibration.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupDeckCalibration.test.tsx index 7b8f54191a1..05e43c3a41f 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupDeckCalibration.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupDeckCalibration.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' import { describe, it, beforeEach, afterEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupFlexPipetteCalibrationItem.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupFlexPipetteCalibrationItem.test.tsx index 5013abc419c..d178c6fedc6 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupFlexPipetteCalibrationItem.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupFlexPipetteCalibrationItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibration.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibration.test.tsx index 9dd85d2e69b..ee59da5370b 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibration.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibration.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibrationItem.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibrationItem.test.tsx index f2857d5e6e8..effcb32b60f 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibrationItem.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupPipetteCalibrationItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupRobotCalibration.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupRobotCalibration.test.tsx index 6ec9fb8f090..8d737f26452 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupRobotCalibration.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupRobotCalibration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupStep.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupStep.test.tsx index 51be9501e09..705866c51b2 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupStep.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupStep.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibration.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibration.test.tsx index 5f78c69802e..2c6783f0d0e 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibration.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibration.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibrationButton.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibrationButton.test.tsx index bd6b66f2592..ed636c628d2 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibrationButton.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/SetupTipLengthCalibrationButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { screen, fireEvent } from '@testing-library/react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/ReachableBanner.tsx b/app/src/organisms/Devices/ReachableBanner.tsx index 35c56cad8b9..8e278092393 100644 --- a/app/src/organisms/Devices/ReachableBanner.tsx +++ b/app/src/organisms/Devices/ReachableBanner.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { SPACING, Banner } from '@opentrons/components' import { REACHABLE } from '/app/redux/discovery' diff --git a/app/src/organisms/Devices/RecentProtocolRuns.tsx b/app/src/organisms/Devices/RecentProtocolRuns.tsx index 9afce240cf5..6f31f0f7688 100644 --- a/app/src/organisms/Devices/RecentProtocolRuns.tsx +++ b/app/src/organisms/Devices/RecentProtocolRuns.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useAllProtocolsQuery } from '@opentrons/react-api-client' import { diff --git a/app/src/organisms/Devices/RobotCard.tsx b/app/src/organisms/Devices/RobotCard.tsx index bf70a6f2ead..e4598567bb8 100644 --- a/app/src/organisms/Devices/RobotCard.tsx +++ b/app/src/organisms/Devices/RobotCard.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/Devices/RobotOverview.tsx b/app/src/organisms/Devices/RobotOverview.tsx index 6a69961a199..b07e5a2a822 100644 --- a/app/src/organisms/Devices/RobotOverview.tsx +++ b/app/src/organisms/Devices/RobotOverview.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/DeviceResetModal.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/DeviceResetModal.tsx index 5b3497f3d89..49a6531c302 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/DeviceResetModal.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/DeviceResetModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import last from 'lodash/last' @@ -80,7 +80,7 @@ export function DeviceResetModal({ } } - React.useEffect(() => { + useEffect(() => { if (resetRequestStatus === SUCCESS) closeModal() }, [resetRequestStatus, closeModal]) diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetModal.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetModal.test.tsx index a74236888fa..a5a3a91d219 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetModal.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetSlideout.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetSlideout.test.tsx index c42b289f7b0..7cc668503dc 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetSlideout.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/DeviceResetSlideout.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/RenameRobotSlideout.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/RenameRobotSlideout.test.tsx index 7a121176b11..6f7b1b4ab28 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/RenameRobotSlideout.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/AdvancedTabSlideouts/__tests__/RenameRobotSlideout.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen, waitFor } from '@testing-library/react' import { describe, it, vi, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/DeviceReset.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/DeviceReset.tsx index 5a6aed28894..2249e453fe6 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/DeviceReset.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/DeviceReset.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/DisplayRobotName.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/DisplayRobotName.tsx index e71a87124b1..c6a380cd6e5 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/DisplayRobotName.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/DisplayRobotName.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/EnableStatusLight.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/EnableStatusLight.tsx index c782e680dc1..4e3c7fcc0f0 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/EnableStatusLight.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/EnableStatusLight.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/FactoryMode.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/FactoryMode.tsx index 89a7b9b0597..14cb3766040 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/FactoryMode.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/FactoryMode.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/GantryHoming.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/GantryHoming.tsx index a47fcb8d537..96ea82a59cf 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/GantryHoming.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/GantryHoming.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/LegacySettings.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/LegacySettings.tsx index 8b2a9fb61b2..5ea0ae6e5ec 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/LegacySettings.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/LegacySettings.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/OpenJupyterControl.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/OpenJupyterControl.tsx index 5653e750ab4..1fae3e17676 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/OpenJupyterControl.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/OpenJupyterControl.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotInformation.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotInformation.tsx index 9e7528bbcdc..05d492261ba 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotInformation.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotInformation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Box, diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotServerVersion.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotServerVersion.tsx index 650b4d0bb3c..1353131e794 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotServerVersion.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/RobotServerVersion.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/ShortTrashBin.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/ShortTrashBin.tsx index da928b01721..5bc00476406 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/ShortTrashBin.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/ShortTrashBin.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/UsageSettings.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/UsageSettings.tsx index 491a5d8becd..e8843af6019 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/UsageSettings.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/UsageSettings.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/UseOlderAspirateBehavior.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/UseOlderAspirateBehavior.tsx index 3f8bc946976..c3496621f18 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/UseOlderAspirateBehavior.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/UseOlderAspirateBehavior.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DeviceReset.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DeviceReset.test.tsx index 986e966c13d..fae578451ba 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DeviceReset.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DeviceReset.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DisplayRobotName.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DisplayRobotName.test.tsx index 8b817df27ba..8a4cc86e293 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DisplayRobotName.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/DisplayRobotName.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/EnableStatusLight.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/EnableStatusLight.test.tsx index 37e5c0778ba..2e2cc956bde 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/EnableStatusLight.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/EnableStatusLight.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/GantryHoming.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/GantryHoming.test.tsx index 49402e00c97..87c43f494f9 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/GantryHoming.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/GantryHoming.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/LegacySettings.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/LegacySettings.test.tsx index 7da47c95e67..14237d9e738 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/LegacySettings.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/LegacySettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect, beforeEach } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/OpenJupyterControl.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/OpenJupyterControl.test.tsx index fe323a5667b..57a01e25680 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/OpenJupyterControl.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/OpenJupyterControl.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotInformation.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotInformation.test.tsx index 985e8b970f0..51769c2b7e5 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotInformation.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotInformation.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotServerVersion.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotServerVersion.test.tsx index face0f2e2c7..07f2877ec43 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotServerVersion.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/RobotServerVersion.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/ShortTrashBin.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/ShortTrashBin.test.tsx index 8d1ee357b9f..3465535546b 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/ShortTrashBin.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/ShortTrashBin.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/Troubleshooting.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/Troubleshooting.test.tsx index 6c690e4b114..659154d22ff 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/Troubleshooting.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/Troubleshooting.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { act, waitFor, screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UpdateRobotSoftware.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UpdateRobotSoftware.test.tsx index ab56af2567e..d8845e81d06 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UpdateRobotSoftware.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UpdateRobotSoftware.test.tsx @@ -1,5 +1,4 @@ /* eslint-disable testing-library/no-node-access */ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UsageSettings.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UsageSettings.test.tsx index 1543209d00d..98790f1b3bc 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UsageSettings.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UsageSettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen, fireEvent } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UseOlderAspirateBehavior.test.tsx b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UseOlderAspirateBehavior.test.tsx index aeee92b4cd5..a44111c1c11 100644 --- a/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UseOlderAspirateBehavior.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/AdvancedTab/__tests__/UseOlderAspirateBehavior.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen, fireEvent } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormModal.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormModal.tsx index 3e62f53acaf..60ce3d2a88e 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormModal.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Controller } from 'react-hook-form' import styled, { css } from 'styled-components' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormRow.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormRow.tsx index 40a67ff2c68..1481d3f40f9 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormRow.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/FormRow.tsx @@ -1,5 +1,5 @@ // presentational components for the wifi connect form -import * as React from 'react' +import type * as React from 'react' import styled from 'styled-components' import { FONT_WEIGHT_SEMIBOLD, SPACING } from '@opentrons/components' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/KeyFileField.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/KeyFileField.tsx index da4e9d4db4b..376048ba420 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/KeyFileField.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/KeyFileField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { SelectField } from '@opentrons/components' import { FormRow } from './FormRow' @@ -53,7 +53,7 @@ export const KeyFileField = (props: KeyFileFieldProps): JSX.Element => { fieldState ) const options = [makeKeyOptions(wifiKeys), ADD_NEW_KEY_OPTION_GROUP] - const uploadKeyRef = React.useRef(null) + const uploadKeyRef = useRef(null) const handleValueChange = (_: string, value: string): void => { if (value === ADD_NEW_KEY_VALUE) { diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/SecurityField.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/SecurityField.tsx index 142a5e6d624..c9fa4e0c069 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/SecurityField.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/SecurityField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { SelectField } from '@opentrons/components' import { SECURITY_NONE, SECURITY_WPA_PSK } from '../constants' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx index 4cfa4c0c48c..2242dabea91 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useReducer } from 'react' import { LegacyInputField, @@ -32,7 +32,7 @@ export const TextField = (props: TextFieldProps): JSX.Element => { field, fieldState ) - const [showPw, toggleShowPw] = React.useReducer(show => !show, false) + const [showPw, toggleShowPw] = useReducer(show => !show, false) const type = isPassword && !showPw ? INPUT_TYPE_PASSWORD : INPUT_TYPE_TEXT return ( diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx index c9f726dcb76..3e1c731d33e 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useForm } from 'react-hook-form' import { useResetFormOnSecurityChange } from './form-state' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/DisconnectModal.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/DisconnectModal.tsx index 251c40a26e0..d5efae7a976 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/DisconnectModal.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/DisconnectModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import last from 'lodash/last' @@ -113,7 +113,7 @@ export const DisconnectModal = ({ disconnectModalBody = t('disconnect_from_wifi_network_failure', { ssid }) } - React.useEffect(() => { + useEffect(() => { if (isDisconnected) { dispatch(clearWifiStatus(robotName)) } diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ResultModal.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ResultModal.tsx index c929e4bf14b..6628c35dfc5 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ResultModal.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ResultModal.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { AlertModal, SpinnerModal } from '@opentrons/components' import * as Copy from './i18n' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/NetworkOptionLabel.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/NetworkOptionLabel.tsx index 61a78da004e..0a982be826f 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/NetworkOptionLabel.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/NetworkOptionLabel.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { Icon, FONT_BODY_1_DARK, SPACING } from '@opentrons/components' import { SECURITY_NONE } from '/app/redux/networking' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/index.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/index.tsx index 6e9aecd7ee8..b85cc72d563 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/index.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/SelectSsid/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { CONTEXT_MENU } from '@opentrons/components' import { SelectField } from '/app/atoms/SelectField' import * as Copy from '../i18n' diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/__tests__/DisconnectModal.test.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/__tests__/DisconnectModal.test.tsx index 5a6b46acdc7..7976784878d 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/__tests__/DisconnectModal.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/__tests__/DisconnectModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/RobotSettings/RobotSettingsNetworking.tsx b/app/src/organisms/Devices/RobotSettings/RobotSettingsNetworking.tsx index 0ad19fff922..57acc939d51 100644 --- a/app/src/organisms/Devices/RobotSettings/RobotSettingsNetworking.tsx +++ b/app/src/organisms/Devices/RobotSettings/RobotSettingsNetworking.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' @@ -56,9 +56,7 @@ export function RobotSettingsNetworking({ const isRobotBusy = useIsRobotBusy({ poll: true }) const isFlex = useIsFlex(robotName) - const [showDisconnectModal, setShowDisconnectModal] = React.useState( - false - ) + const [showDisconnectModal, setShowDisconnectModal] = useState(false) const canDisconnect = useCanDisconnect(robotName) @@ -90,7 +88,7 @@ export function RobotSettingsNetworking({ useInterval(() => dispatch(fetchStatus(robotName)), STATUS_REFRESH_MS, true) - React.useEffect(() => { + useEffect(() => { updateRobotStatus(isRobotBusy) }, [isRobotBusy, updateRobotStatus]) diff --git a/app/src/organisms/Devices/RobotSettings/SelectNetwork.tsx b/app/src/organisms/Devices/RobotSettings/SelectNetwork.tsx index 31994df4f74..db5a7bc5aad 100644 --- a/app/src/organisms/Devices/RobotSettings/SelectNetwork.tsx +++ b/app/src/organisms/Devices/RobotSettings/SelectNetwork.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { useDispatch, useSelector } from 'react-redux' import last from 'lodash/last' @@ -35,7 +35,7 @@ export const SelectNetwork = ({ const eapOptions = useSelector((state: State) => Networking.getEapOptions(state, robotName) ) - const [changeState, setChangeState] = React.useState({ + const [changeState, setChangeState] = useState({ type: null, }) const dispatch = useDispatch() @@ -53,7 +53,7 @@ export const SelectNetwork = ({ } } - React.useEffect(() => { + useEffect(() => { // if we're connecting to a network, ensure we get the info needed to // populate the configuration forms if (changeState.type === CONNECT || changeState.type === JOIN_OTHER) { diff --git a/app/src/organisms/Devices/RobotSettings/SettingToggle.tsx b/app/src/organisms/Devices/RobotSettings/SettingToggle.tsx index dc3bd18a48a..4407779d888 100644 --- a/app/src/organisms/Devices/RobotSettings/SettingToggle.tsx +++ b/app/src/organisms/Devices/RobotSettings/SettingToggle.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/MigrationWarningModal.tsx b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/MigrationWarningModal.tsx index 38d684555f3..cf41e3efe8a 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/MigrationWarningModal.tsx +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/MigrationWarningModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/UpdateRobotModal.tsx b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/UpdateRobotModal.tsx index 0506a3b20b9..7814a0d7d4e 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/UpdateRobotModal.tsx +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/UpdateRobotModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import styled, { css } from 'styled-components' @@ -91,7 +91,7 @@ export function UpdateRobotModal({ disabledReason = updateFromFileDisabledReason else if (isRobotBusy) disabledReason = t('robot_busy_protocol') - React.useEffect(() => { + useEffect(() => { dispatch(robotUpdateChangelogSeen(robotName)) }, [robotName]) diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/ViewUpdateModal.tsx b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/ViewUpdateModal.tsx index 2a243063d28..783d0da6b89 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/ViewUpdateModal.tsx +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/ViewUpdateModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useSelector } from 'react-redux' @@ -28,7 +28,7 @@ export function ViewUpdateModal( props: ViewUpdateModalProps ): JSX.Element | null { const { robotName, robot, closeModal } = props - const [showAppUpdateModal, setShowAppUpdateModal] = React.useState(true) + const [showAppUpdateModal, setShowAppUpdateModal] = useState(true) const updateInfo = useSelector((state: State) => getRobotUpdateInfo(state, robotName) @@ -44,10 +44,9 @@ export function ViewUpdateModal( useSelector(getAvailableShellUpdate) ) - const [ - showMigrationWarning, - setShowMigrationWarning, - ] = React.useState(robotSystemType === OT2_BALENA) + const [showMigrationWarning, setShowMigrationWarning] = useState( + robotSystemType === OT2_BALENA + ) const notNowButton = { onClick: closeModal, diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/RobotUpdateProgressModal.test.tsx b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/RobotUpdateProgressModal.test.tsx index 6d86f67d831..a2139f636bd 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/RobotUpdateProgressModal.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/RobotUpdateProgressModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { i18n } from '/app/i18n' import { act, fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/UpdateRobotModal.test.tsx b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/UpdateRobotModal.test.tsx index 48419b629da..9eb328092eb 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/UpdateRobotModal.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/UpdateRobotModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createStore } from 'redux' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/useRobotUpdateInfo.test.tsx b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/useRobotUpdateInfo.test.tsx index 418199bdc90..2897110aacc 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/useRobotUpdateInfo.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/__tests__/useRobotUpdateInfo.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { renderHook } from '@testing-library/react' import { createStore } from 'redux' import { I18nextProvider } from 'react-i18next' diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/index.tsx b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/index.tsx index 6df07dd09f0..c5802005a82 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/index.tsx +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useEffect, useCallback } from 'react' import { useSelector, useDispatch } from 'react-redux' import NiceModal, { useModal } from '@ebay/nice-modal-react' @@ -30,21 +30,21 @@ export const handleUpdateBuildroot = ( const UpdateBuildroot = NiceModal.create( (props: UpdateBuildrootProps): JSX.Element | null => { const { robot } = props - const hasSeenSessionOnce = React.useRef(false) + const hasSeenSessionOnce = useRef(false) const modal = useModal() - const robotName = React.useRef(robot?.name ?? '') + const robotName = useRef(robot?.name ?? '') const dispatch = useDispatch() const session = useSelector(getRobotUpdateSession) if (!hasSeenSessionOnce.current && session) hasSeenSessionOnce.current = true - React.useEffect(() => { + useEffect(() => { if (robotName.current) { dispatch(setRobotUpdateSeen(robotName.current)) } }, [robotName]) - const ignoreUpdate = React.useCallback(() => { + const ignoreUpdate = useCallback(() => { if (robotName.current) { dispatch(robotUpdateIgnored(robotName.current)) } diff --git a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/useRobotUpdateInfo.ts b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/useRobotUpdateInfo.ts index 1d39a17e157..d7a01f7d105 100644 --- a/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/useRobotUpdateInfo.ts +++ b/app/src/organisms/Devices/RobotSettings/UpdateBuildroot/useRobotUpdateInfo.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo, useState, useRef } from 'react' import { useSelector } from 'react-redux' import { getRobotUpdateDownloadProgress } from '/app/redux/robot-update' @@ -12,9 +12,7 @@ export function useRobotUpdateInfo( ): { updateStep: UpdateStep | null; progressPercent: number } { const progressPercent = useFindProgressPercentFrom(robotName, session) - const updateStep = React.useMemo(() => determineUpdateStepFrom(session), [ - session, - ]) + const updateStep = useMemo(() => determineUpdateStepFrom(session), [session]) return { updateStep, @@ -26,11 +24,11 @@ function useFindProgressPercentFrom( robotName: string, session: RobotUpdateSession | null ): number { - const [progressPercent, setProgressPercent] = React.useState(0) - const hasSeenDownloadFileStep = React.useRef(false) - const prevSeenUpdateStep = React.useRef(null) - const prevSeenStepProgress = React.useRef(0) - const currentStepWithProgress = React.useRef(-1) + const [progressPercent, setProgressPercent] = useState(0) + const hasSeenDownloadFileStep = useRef(false) + const prevSeenUpdateStep = useRef(null) + const prevSeenStepProgress = useRef(0) + const currentStepWithProgress = useRef(-1) const downloadProgress = useSelector((state: State) => getRobotUpdateDownloadProgress(state, robotName) diff --git a/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsAdvanced.test.tsx b/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsAdvanced.test.tsx index 94769e6d161..b2eb4a4dafa 100644 --- a/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsAdvanced.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsAdvanced.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' import { when } from 'vitest-when' diff --git a/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsFeatureFlags.test.tsx b/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsFeatureFlags.test.tsx index f5c1ddc94ca..186148e6b44 100644 --- a/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsFeatureFlags.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsFeatureFlags.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { when } from 'vitest-when' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsNetworking.test.tsx b/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsNetworking.test.tsx index e39ca5d6281..7c37ebd0b45 100644 --- a/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsNetworking.test.tsx +++ b/app/src/organisms/Devices/RobotSettings/__tests__/RobotSettingsNetworking.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/RobotStatusHeader.tsx b/app/src/organisms/Devices/RobotStatusHeader.tsx index 51afab298b4..77cad0933ea 100644 --- a/app/src/organisms/Devices/RobotStatusHeader.tsx +++ b/app/src/organisms/Devices/RobotStatusHeader.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import { Link, useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/Devices/__tests__/CalibrationStatusBanner.test.tsx b/app/src/organisms/Devices/__tests__/CalibrationStatusBanner.test.tsx index 8e893bb3851..fd50c5185ae 100644 --- a/app/src/organisms/Devices/__tests__/CalibrationStatusBanner.test.tsx +++ b/app/src/organisms/Devices/__tests__/CalibrationStatusBanner.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/__tests__/ConnectionTroubleshootingModal.test.tsx b/app/src/organisms/Devices/__tests__/ConnectionTroubleshootingModal.test.tsx index 01e73dc9880..d725929a081 100644 --- a/app/src/organisms/Devices/__tests__/ConnectionTroubleshootingModal.test.tsx +++ b/app/src/organisms/Devices/__tests__/ConnectionTroubleshootingModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/Devices/__tests__/DevicesEmptyState.test.tsx b/app/src/organisms/Devices/__tests__/DevicesEmptyState.test.tsx index 75448e8611e..e05d8499550 100644 --- a/app/src/organisms/Devices/__tests__/DevicesEmptyState.test.tsx +++ b/app/src/organisms/Devices/__tests__/DevicesEmptyState.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/__tests__/EstopBanner.test.tsx b/app/src/organisms/Devices/__tests__/EstopBanner.test.tsx index 788588ab747..7d052568378 100644 --- a/app/src/organisms/Devices/__tests__/EstopBanner.test.tsx +++ b/app/src/organisms/Devices/__tests__/EstopBanner.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/__tests__/HistoricalProtocolRun.test.tsx b/app/src/organisms/Devices/__tests__/HistoricalProtocolRun.test.tsx index e91517e45e8..070f1c614de 100644 --- a/app/src/organisms/Devices/__tests__/HistoricalProtocolRun.test.tsx +++ b/app/src/organisms/Devices/__tests__/HistoricalProtocolRun.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/__tests__/HistoricalProtocolRunOverflowMenu.test.tsx b/app/src/organisms/Devices/__tests__/HistoricalProtocolRunOverflowMenu.test.tsx index bd6aa3e5cba..f9d93904709 100644 --- a/app/src/organisms/Devices/__tests__/HistoricalProtocolRunOverflowMenu.test.tsx +++ b/app/src/organisms/Devices/__tests__/HistoricalProtocolRunOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { when } from 'vitest-when' diff --git a/app/src/organisms/Devices/__tests__/InstrumentsAndModules.test.tsx b/app/src/organisms/Devices/__tests__/InstrumentsAndModules.test.tsx index 297f8826f6b..e3c927524bc 100644 --- a/app/src/organisms/Devices/__tests__/InstrumentsAndModules.test.tsx +++ b/app/src/organisms/Devices/__tests__/InstrumentsAndModules.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/__tests__/RecentProtocolRuns.test.tsx b/app/src/organisms/Devices/__tests__/RecentProtocolRuns.test.tsx index bb183476da5..3127fab7c1e 100644 --- a/app/src/organisms/Devices/__tests__/RecentProtocolRuns.test.tsx +++ b/app/src/organisms/Devices/__tests__/RecentProtocolRuns.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/Devices/__tests__/RobotCard.test.tsx b/app/src/organisms/Devices/__tests__/RobotCard.test.tsx index 4f8cd715ac2..c5dba81b373 100644 --- a/app/src/organisms/Devices/__tests__/RobotCard.test.tsx +++ b/app/src/organisms/Devices/__tests__/RobotCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { when } from 'vitest-when' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/Devices/__tests__/RobotOverflowMenu.test.tsx b/app/src/organisms/Devices/__tests__/RobotOverflowMenu.test.tsx index 0a8c56914b7..e2c9bbe5067 100644 --- a/app/src/organisms/Devices/__tests__/RobotOverflowMenu.test.tsx +++ b/app/src/organisms/Devices/__tests__/RobotOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/Devices/__tests__/RobotOverview.test.tsx b/app/src/organisms/Devices/__tests__/RobotOverview.test.tsx index 8f9a570dd7b..a02b1424923 100644 --- a/app/src/organisms/Devices/__tests__/RobotOverview.test.tsx +++ b/app/src/organisms/Devices/__tests__/RobotOverview.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { when } from 'vitest-when' import { screen, fireEvent } from '@testing-library/react' diff --git a/app/src/organisms/Devices/__tests__/RobotOverviewOverflowMenu.test.tsx b/app/src/organisms/Devices/__tests__/RobotOverviewOverflowMenu.test.tsx index 30fc3a30efa..8484558df0f 100644 --- a/app/src/organisms/Devices/__tests__/RobotOverviewOverflowMenu.test.tsx +++ b/app/src/organisms/Devices/__tests__/RobotOverviewOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/organisms/Devices/__tests__/RobotStatusHeader.test.tsx b/app/src/organisms/Devices/__tests__/RobotStatusHeader.test.tsx index 627c08bcdfe..465c46cc566 100644 --- a/app/src/organisms/Devices/__tests__/RobotStatusHeader.test.tsx +++ b/app/src/organisms/Devices/__tests__/RobotStatusHeader.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { RUN_STATUS_RUNNING } from '@opentrons/api-client' import { when } from 'vitest-when' diff --git a/app/src/organisms/Devices/hooks/__tests__/useCalibrationTaskList.test.tsx b/app/src/organisms/Devices/hooks/__tests__/useCalibrationTaskList.test.tsx index b34ba724274..9d675c77f7e 100644 --- a/app/src/organisms/Devices/hooks/__tests__/useCalibrationTaskList.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/useCalibrationTaskList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createStore } from 'redux' import { I18nextProvider } from 'react-i18next' import { Provider } from 'react-redux' diff --git a/app/src/organisms/Devices/hooks/__tests__/useDeckCalibrationData.test.tsx b/app/src/organisms/Devices/hooks/__tests__/useDeckCalibrationData.test.tsx index e91bf298088..c08f0e3e1e5 100644 --- a/app/src/organisms/Devices/hooks/__tests__/useDeckCalibrationData.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/useDeckCalibrationData.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { Provider } from 'react-redux' diff --git a/app/src/organisms/Devices/hooks/__tests__/useIsRobotViewable.test.tsx b/app/src/organisms/Devices/hooks/__tests__/useIsRobotViewable.test.tsx index fb6cf312c6c..ff3a6752800 100644 --- a/app/src/organisms/Devices/hooks/__tests__/useIsRobotViewable.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/useIsRobotViewable.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { Provider } from 'react-redux' diff --git a/app/src/organisms/Devices/hooks/__tests__/useLights.test.tsx b/app/src/organisms/Devices/hooks/__tests__/useLights.test.tsx index 5f45fbecb23..35fc2437826 100644 --- a/app/src/organisms/Devices/hooks/__tests__/useLights.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/useLights.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { Provider } from 'react-redux' import { createStore } from 'redux' diff --git a/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibration.test.tsx b/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibration.test.tsx index e3f2cf6618f..2c23dcb0f61 100644 --- a/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibration.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { Provider } from 'react-redux' diff --git a/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibrations.test.tsx b/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibrations.test.tsx index 33c33fe27c2..9305b34af38 100644 --- a/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibrations.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/usePipetteOffsetCalibrations.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { renderHook } from '@testing-library/react' diff --git a/app/src/organisms/Devices/hooks/__tests__/useSyncRobotClock.test.tsx b/app/src/organisms/Devices/hooks/__tests__/useSyncRobotClock.test.tsx index 9a7f6c6ab18..02b593fbaab 100644 --- a/app/src/organisms/Devices/hooks/__tests__/useSyncRobotClock.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/useSyncRobotClock.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { Provider } from 'react-redux' import { createStore } from 'redux' diff --git a/app/src/organisms/Devices/hooks/__tests__/useTipLengthCalibrations.test.tsx b/app/src/organisms/Devices/hooks/__tests__/useTipLengthCalibrations.test.tsx index 4162c310037..7281b009b5c 100644 --- a/app/src/organisms/Devices/hooks/__tests__/useTipLengthCalibrations.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/useTipLengthCalibrations.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/organisms/Devices/hooks/__tests__/useTrackCreateProtocolRunEvent.test.tsx b/app/src/organisms/Devices/hooks/__tests__/useTrackCreateProtocolRunEvent.test.tsx index 88ec0f8a9fe..b8cf7fd9896 100644 --- a/app/src/organisms/Devices/hooks/__tests__/useTrackCreateProtocolRunEvent.test.tsx +++ b/app/src/organisms/Devices/hooks/__tests__/useTrackCreateProtocolRunEvent.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createStore } from 'redux' import { Provider } from 'react-redux' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/organisms/Devices/hooks/useDownloadRunLog.ts b/app/src/organisms/Devices/hooks/useDownloadRunLog.ts index 1dd189e83bc..61acbfb12c4 100644 --- a/app/src/organisms/Devices/hooks/useDownloadRunLog.ts +++ b/app/src/organisms/Devices/hooks/useDownloadRunLog.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { getRun, getCommands, getProtocol } from '@opentrons/api-client' import { useHost } from '@opentrons/react-api-client' @@ -13,7 +13,7 @@ export function useDownloadRunLog( ): { downloadRunLog: () => void; isRunLogLoading: boolean } { const { t } = useTranslation('run_details') const host = useHost() - const [isLoading, setIsLoading] = React.useState(false) + const [isLoading, setIsLoading] = useState(false) const { makeToast } = useToaster() diff --git a/app/src/organisms/Devices/hooks/useLights.ts b/app/src/organisms/Devices/hooks/useLights.ts index dcd9aad698f..02ba9a22dbc 100644 --- a/app/src/organisms/Devices/hooks/useLights.ts +++ b/app/src/organisms/Devices/hooks/useLights.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useLightsQuery, useSetLightsMutation, @@ -9,13 +9,13 @@ export function useLights(): { lightsOn: boolean | null toggleLights: () => void } { - const [lightsOnCache, setLightsOnCache] = React.useState(false) + const [lightsOnCache, setLightsOnCache] = useState(false) const { setLights, data: setLightsData } = useSetLightsMutation() const { data: lightsData } = useLightsQuery({ refetchInterval: LIGHTS_POLL_MS, }) - React.useEffect(() => { + useEffect(() => { if (setLightsData != null) { setLightsOnCache(setLightsData.on) } else if (lightsData != null) { diff --git a/app/src/organisms/Devices/hooks/usePipetteOffsetCalibration.ts b/app/src/organisms/Devices/hooks/usePipetteOffsetCalibration.ts index ff6522f56ed..c441e618647 100644 --- a/app/src/organisms/Devices/hooks/usePipetteOffsetCalibration.ts +++ b/app/src/organisms/Devices/hooks/usePipetteOffsetCalibration.ts @@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect } from 'react' import { useSelector } from 'react-redux' import { @@ -29,7 +29,7 @@ export function usePipetteOffsetCalibration( ) ) - React.useEffect(() => { + useEffect(() => { if (robotName != null) { dispatchRequest(fetchPipetteOffsetCalibrations(robotName)) } diff --git a/app/src/organisms/Devices/hooks/useSyncRobotClock.ts b/app/src/organisms/Devices/hooks/useSyncRobotClock.ts index ddc74247d6d..9553ca4a3cb 100644 --- a/app/src/organisms/Devices/hooks/useSyncRobotClock.ts +++ b/app/src/organisms/Devices/hooks/useSyncRobotClock.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useDispatch } from 'react-redux' import { syncSystemTime } from '/app/redux/robot-admin' @@ -12,7 +12,7 @@ import type { Dispatch } from '/app/redux/types' export function useSyncRobotClock(robotName: string | null): void { const dispatch = useDispatch() - React.useEffect(() => { + useEffect(() => { if (robotName != null) { dispatch(syncSystemTime(robotName)) } diff --git a/app/src/organisms/DropTipWizardFlows/ConfirmPosition.tsx b/app/src/organisms/DropTipWizardFlows/ConfirmPosition.tsx index 6742672beca..d146b9210de 100644 --- a/app/src/organisms/DropTipWizardFlows/ConfirmPosition.tsx +++ b/app/src/organisms/DropTipWizardFlows/ConfirmPosition.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' @@ -34,8 +34,8 @@ export interface UseConfirmPositionResult { export function useConfirmPosition( currentStep: DropTipWizardContainerProps['currentStep'] ): UseConfirmPositionResult { - const [showConfirmPosition, setShowConfirmPosition] = React.useState(false) - const [isRobotPipetteMoving, setIsRobotPipetteMoving] = React.useState(false) + const [showConfirmPosition, setShowConfirmPosition] = useState(false) + const [isRobotPipetteMoving, setIsRobotPipetteMoving] = useState(false) const toggleShowConfirmPosition = (): void => { setShowConfirmPosition(!showConfirmPosition) @@ -46,7 +46,7 @@ export function useConfirmPosition( } // NOTE: The useEffect logic is potentially problematic on views that are not steps, but it is not currently. - React.useEffect(() => { + useEffect(() => { if ( currentStep !== POSITION_AND_BLOWOUT && currentStep !== POSITION_AND_DROP_TIP && diff --git a/app/src/organisms/DropTipWizardFlows/DropTipWizard.tsx b/app/src/organisms/DropTipWizardFlows/DropTipWizard.tsx index caa0c6a733d..cb3f0691113 100644 --- a/app/src/organisms/DropTipWizardFlows/DropTipWizard.tsx +++ b/app/src/organisms/DropTipWizardFlows/DropTipWizard.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -278,7 +278,7 @@ function useInitiateExit(): { isExitInitiated: boolean toggleExitInitiated: () => void } { - const [isExitInitiated, setIsExitInitiated] = React.useState(false) + const [isExitInitiated, setIsExitInitiated] = useState(false) const toggleExitInitiated = (): void => { setIsExitInitiated(true) diff --git a/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx b/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx index 6c7c4530af2..477d84dd4aa 100644 --- a/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx +++ b/app/src/organisms/DropTipWizardFlows/DropTipWizardFlows.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDropTipRouting, useDropTipWithType } from './hooks' import { DropTipWizard } from './DropTipWizard' @@ -20,7 +20,7 @@ export function useDropTipWizardFlows(): { showDTWiz: boolean toggleDTWiz: () => void } { - const [showDTWiz, setShowDTWiz] = React.useState(false) + const [showDTWiz, setShowDTWiz] = useState(false) const toggleDTWiz = (): void => { setShowDTWiz(!showDTWiz) diff --git a/app/src/organisms/DropTipWizardFlows/DropTipWizardHeader.tsx b/app/src/organisms/DropTipWizardFlows/DropTipWizardHeader.tsx index 551cb2435c5..e883da67d2b 100644 --- a/app/src/organisms/DropTipWizardFlows/DropTipWizardHeader.tsx +++ b/app/src/organisms/DropTipWizardFlows/DropTipWizardHeader.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { BEFORE_BEGINNING, BLOWOUT_SUCCESS, DT_ROUTES } from './constants' @@ -70,11 +70,9 @@ export function useSeenBlowoutSuccess({ currentRoute, currentStepIdx, }: UseSeenBlowoutSuccessProps): UseSeenBlowoutSuccessResult { - const [hasSeenBlowoutSuccess, setHasSeenBlowoutSuccess] = React.useState( - false - ) + const [hasSeenBlowoutSuccess, setHasSeenBlowoutSuccess] = useState(false) - React.useEffect(() => { + useEffect(() => { if (currentStep === BLOWOUT_SUCCESS) { setHasSeenBlowoutSuccess(true) } else if (currentStep === BEFORE_BEGINNING) { diff --git a/app/src/organisms/DropTipWizardFlows/ErrorInfo.tsx b/app/src/organisms/DropTipWizardFlows/ErrorInfo.tsx index 4ae0ef5ad60..400a34fce72 100644 --- a/app/src/organisms/DropTipWizardFlows/ErrorInfo.tsx +++ b/app/src/organisms/DropTipWizardFlows/ErrorInfo.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/DropTipWizardFlows/ExitConfirmation.tsx b/app/src/organisms/DropTipWizardFlows/ExitConfirmation.tsx index 69f1a3270a7..9c5486624b7 100644 --- a/app/src/organisms/DropTipWizardFlows/ExitConfirmation.tsx +++ b/app/src/organisms/DropTipWizardFlows/ExitConfirmation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/DropTipWizardFlows/TipsAttachedModal.tsx b/app/src/organisms/DropTipWizardFlows/TipsAttachedModal.tsx index 401944a29ab..5117c520384 100644 --- a/app/src/organisms/DropTipWizardFlows/TipsAttachedModal.tsx +++ b/app/src/organisms/DropTipWizardFlows/TipsAttachedModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import NiceModal, { useModal } from '@ebay/nice-modal-react' import { Trans, useTranslation } from 'react-i18next' diff --git a/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizard.test.tsx b/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizard.test.tsx index 891bac931c2..b5fe7e78b37 100644 --- a/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizard.test.tsx +++ b/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizardHeader.test.tsx b/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizardHeader.test.tsx index aceecbdd723..69325472a2e 100644 --- a/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizardHeader.test.tsx +++ b/app/src/organisms/DropTipWizardFlows/__tests__/DropTipWizardHeader.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { beforeEach, describe, expect, it, vi } from 'vitest' import { renderHook, screen } from '@testing-library/react' diff --git a/app/src/organisms/DropTipWizardFlows/__tests__/TipsAttachedModal.test.tsx b/app/src/organisms/DropTipWizardFlows/__tests__/TipsAttachedModal.test.tsx index 07acb2c43e2..2eeaf07f70e 100644 --- a/app/src/organisms/DropTipWizardFlows/__tests__/TipsAttachedModal.test.tsx +++ b/app/src/organisms/DropTipWizardFlows/__tests__/TipsAttachedModal.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import NiceModal from '@ebay/nice-modal-react' import { describe, it, beforeEach, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/DropTipWizardFlows/hooks/__tests__/useTipAttachmentStatus.test.tsx b/app/src/organisms/DropTipWizardFlows/hooks/__tests__/useTipAttachmentStatus.test.tsx index 86d6db11a10..6d9d25719d2 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/__tests__/useTipAttachmentStatus.test.tsx +++ b/app/src/organisms/DropTipWizardFlows/hooks/__tests__/useTipAttachmentStatus.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { act, renderHook } from '@testing-library/react' diff --git a/app/src/organisms/DropTipWizardFlows/hooks/errors.tsx b/app/src/organisms/DropTipWizardFlows/hooks/errors.tsx index cdfa5b32c2b..0a7cdd91d84 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/errors.tsx +++ b/app/src/organisms/DropTipWizardFlows/hooks/errors.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { AlertPrimaryButton, SPACING } from '@opentrons/components' diff --git a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts index 3922b8ecf19..8a9579962ed 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts +++ b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipCommands.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useDeleteMaintenanceRunMutation } from '@opentrons/react-api-client' @@ -59,9 +59,9 @@ export function useDropTipCommands({ fixitCommandTypeUtils, }: UseDropTipSetupCommandsParams): UseDropTipCommandsResult { const isFlex = robotType === FLEX_ROBOT_TYPE - const [hasSeenClose, setHasSeenClose] = React.useState(false) - const [jogQueue, setJogQueue] = React.useState Promise>>([]) - const [isJogging, setIsJogging] = React.useState(false) + const [hasSeenClose, setHasSeenClose] = useState(false) + const [jogQueue, setJogQueue] = useState Promise>>([]) + const [isJogging, setIsJogging] = useState(false) const pipetteId = fixitCommandTypeUtils?.pipetteId ?? null const { deleteMaintenanceRun } = useDeleteMaintenanceRunMutation() @@ -189,7 +189,7 @@ export function useDropTipCommands({ } } - React.useEffect(() => { + useEffect(() => { processJogQueue() }, [jogQueue.length, isJogging]) diff --git a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipMaintenanceRun.tsx b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipMaintenanceRun.tsx index 9b3e5b67762..fcb69ff467d 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipMaintenanceRun.tsx +++ b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipMaintenanceRun.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useChainMaintenanceCommands, @@ -32,7 +32,7 @@ export function useDropTipMaintenanceRun({ }: UseDropTipMaintenanceRunParams): string | null { const isMaintenanceRunType = issuedCommandsType === 'setup' - const [createdMaintenanceRunId, setCreatedMaintenanceRunId] = React.useState< + const [createdMaintenanceRunId, setCreatedMaintenanceRunId] = useState< string | null >(null) @@ -101,7 +101,7 @@ function useCreateDropTipMaintenanceRun({ }, }) - React.useEffect(() => { + useEffect(() => { if ( issuedCommandsType === 'setup' && mount != null && @@ -140,10 +140,10 @@ function useMonitorMaintenanceRunForDeletion({ const [ monitorMaintenanceRunForDeletion, setMonitorMaintenanceRunForDeletion, - ] = React.useState(false) - const [closedOnce, setClosedOnce] = React.useState(false) + ] = useState(false) + const [closedOnce, setClosedOnce] = useState(false) - React.useEffect(() => { + useEffect(() => { if (isMaintenanceRunType && !closedOnce) { if ( createdMaintenanceRunId !== null && diff --git a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipRouting.tsx b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipRouting.tsx index 50a72417c8b..17e920644fb 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipRouting.tsx +++ b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipRouting.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo, useState, useEffect } from 'react' import head from 'lodash/head' import last from 'lodash/last' @@ -44,18 +44,16 @@ export interface UseDropTipRoutingResult { export function useDropTipRouting( fixitUtils?: FixitCommandTypeUtils ): UseDropTipRoutingResult { - const [initialRoute, initialStep] = React.useMemo( + const [initialRoute, initialStep] = useMemo( () => getInitialRouteAndStep(fixitUtils), [] ) - const [dropTipFlowsMap, setDropTipFlowsMap] = React.useState( - { - currentRoute: initialRoute as DropTipFlowsRoute, - currentStep: initialStep, - currentStepIdx: 0, - } - ) + const [dropTipFlowsMap, setDropTipFlowsMap] = useState({ + currentRoute: initialRoute as DropTipFlowsRoute, + currentStep: initialStep, + currentStepIdx: 0, + }) useReportMap(dropTipFlowsMap, fixitUtils) @@ -186,7 +184,7 @@ export function useReportMap( ): void { const { currentStep, currentRoute } = map - React.useEffect(() => { + useEffect(() => { if (fixitUtils != null) { fixitUtils.reportMap({ route: currentRoute, step: currentStep }) } diff --git a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts index cb7064ac722..df783ca901f 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts +++ b/app/src/organisms/DropTipWizardFlows/hooks/useDropTipWithType.ts @@ -1,5 +1,5 @@ // This is the main unifying function for maintenanceRun and fixit type flows. -import * as React from 'react' +import { useState, useEffect } from 'react' import { useDropTipCommandErrors } from '.' import { useDropTipMaintenanceRun } from './useDropTipMaintenanceRun' @@ -78,9 +78,7 @@ function useErrorDetails(): { errorDetails: ErrorDetails | null setErrorDetails: (errorDetails: SetRobotErrorDetailsParams) => void } { - const [errorDetails, setErrorDetails] = React.useState( - null - ) + const [errorDetails, setErrorDetails] = useState(null) const setRobustErrorDetails = useDropTipCommandErrors(setErrorDetails) return { errorDetails, setErrorDetails: setRobustErrorDetails } @@ -98,7 +96,7 @@ function useIsExitingDT( isExiting: boolean toggleIsExiting: () => void } { - const [isExiting, setIsExiting] = React.useState(false) + const [isExiting, setIsExiting] = useState(false) const toggleIsExiting = (): void => { setIsExiting(!isExiting) @@ -120,7 +118,7 @@ function useRegisterPipetteFixitType({ chainRunCommands, fixitCommandTypeUtils, }: UseRegisterPipetteFixitType): void { - React.useEffect(() => { + useEffect(() => { if (issuedCommandsType === 'fixit') { const command = buildLoadPipetteCommand( instrumentModelSpecs.name, diff --git a/app/src/organisms/DropTipWizardFlows/hooks/useTipAttachmentStatus/index.ts b/app/src/organisms/DropTipWizardFlows/hooks/useTipAttachmentStatus/index.ts index 80d1bb1913c..99d4ea9abd8 100644 --- a/app/src/organisms/DropTipWizardFlows/hooks/useTipAttachmentStatus/index.ts +++ b/app/src/organisms/DropTipWizardFlows/hooks/useTipAttachmentStatus/index.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useCallback } from 'react' import head from 'lodash/head' import { useInstrumentsQuery } from '@opentrons/react-api-client' @@ -45,10 +45,8 @@ export interface TipAttachmentStatusResult { export function useTipAttachmentStatus( params: Omit ): TipAttachmentStatusResult { - const [pipettesWithTip, setPipettesWithTip] = React.useState< - PipetteWithTip[] - >([]) - const [initialPipettesCount, setInitialPipettesCount] = React.useState< + const [pipettesWithTip, setPipettesWithTip] = useState([]) + const [initialPipettesCount, setInitialPipettesCount] = useState< number | null >(null) const { data: attachedInstruments } = useInstrumentsQuery({ @@ -59,9 +57,7 @@ export function useTipAttachmentStatus( const areTipsAttached = pipettesWithTip.length > 0 && head(pipettesWithTip)?.specs != null - const determineTipStatus = React.useCallback((): Promise< - PipetteWithTip[] - > => { + const determineTipStatus = useCallback((): Promise => { return getPipettesWithTipAttached({ ...params, attachedInstruments: attachedInstruments ?? null, diff --git a/app/src/organisms/DropTipWizardFlows/shared/DropTipFooterButtons.tsx b/app/src/organisms/DropTipWizardFlows/shared/DropTipFooterButtons.tsx index e2f4bcd65ee..6825146c06f 100644 --- a/app/src/organisms/DropTipWizardFlows/shared/DropTipFooterButtons.tsx +++ b/app/src/organisms/DropTipWizardFlows/shared/DropTipFooterButtons.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx b/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx index 36e9b1f4632..e129a177ef2 100644 --- a/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx +++ b/app/src/organisms/DropTipWizardFlows/steps/BeforeBeginning.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' @@ -39,7 +39,7 @@ export const BeforeBeginning = ({ modalStyle, }: DropTipWizardContainerProps): JSX.Element | null => { const { t } = useTranslation('drop_tip_wizard') - const [flowType, setFlowType] = React.useState(null) + const [flowType, setFlowType] = useState(null) const handleProceed = (): void => { if (flowType === 'blowout') { diff --git a/app/src/organisms/DropTipWizardFlows/steps/ChooseLocation.tsx b/app/src/organisms/DropTipWizardFlows/steps/ChooseLocation.tsx index a7915c123ec..79db59f9ca6 100644 --- a/app/src/organisms/DropTipWizardFlows/steps/ChooseLocation.tsx +++ b/app/src/organisms/DropTipWizardFlows/steps/ChooseLocation.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { Trans, useTranslation } from 'react-i18next' import { @@ -27,10 +27,7 @@ export const ChooseLocation = ({ }: DropTipWizardContainerProps): JSX.Element | null => { const { moveToAddressableArea } = dropTipCommands const { t } = useTranslation('drop_tip_wizard') - const [ - selectedLocation, - setSelectedLocation, - ] = React.useState() + const [selectedLocation, setSelectedLocation] = useState() const deckDef = getDeckDefFromRobotType(robotType) const handleConfirmPosition = (): void => { diff --git a/app/src/organisms/DropTipWizardFlows/steps/JogToPosition.tsx b/app/src/organisms/DropTipWizardFlows/steps/JogToPosition.tsx index 7277b78aff5..de6b616cf0c 100644 --- a/app/src/organisms/DropTipWizardFlows/steps/JogToPosition.tsx +++ b/app/src/organisms/DropTipWizardFlows/steps/JogToPosition.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/DropTipWizardFlows/steps/Success.tsx b/app/src/organisms/DropTipWizardFlows/steps/Success.tsx index 12c56fa48de..5e88a1ce346 100644 --- a/app/src/organisms/DropTipWizardFlows/steps/Success.tsx +++ b/app/src/organisms/DropTipWizardFlows/steps/Success.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/EmergencyStop/DesktopEstopMissingModal.stories.tsx b/app/src/organisms/EmergencyStop/DesktopEstopMissingModal.stories.tsx index a1bd81c0654..f8729d48263 100644 --- a/app/src/organisms/EmergencyStop/DesktopEstopMissingModal.stories.tsx +++ b/app/src/organisms/EmergencyStop/DesktopEstopMissingModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' diff --git a/app/src/organisms/EmergencyStop/DesktopEstopPressedModal.stories.tsx b/app/src/organisms/EmergencyStop/DesktopEstopPressedModal.stories.tsx index 45c7bd121da..5b999ce2bc5 100644 --- a/app/src/organisms/EmergencyStop/DesktopEstopPressedModal.stories.tsx +++ b/app/src/organisms/EmergencyStop/DesktopEstopPressedModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/organisms/EmergencyStop/EmergencyStopContext.ts b/app/src/organisms/EmergencyStop/EmergencyStopContext.ts index fd5be4b25a9..d79fae0eec1 100644 --- a/app/src/organisms/EmergencyStop/EmergencyStopContext.ts +++ b/app/src/organisms/EmergencyStop/EmergencyStopContext.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { createContext } from 'react' export interface EmergencyStopContextType { isEmergencyStopModalDismissed: boolean @@ -7,9 +7,7 @@ export interface EmergencyStopContextType { ) => void } -export const EmergencyStopContext = React.createContext( - { - isEmergencyStopModalDismissed: false, - setIsEmergencyStopModalDismissed: () => {}, - } -) +export const EmergencyStopContext = createContext({ + isEmergencyStopModalDismissed: false, + setIsEmergencyStopModalDismissed: () => {}, +}) diff --git a/app/src/organisms/EmergencyStop/EstopMissingModal.tsx b/app/src/organisms/EmergencyStop/EstopMissingModal.tsx index e90ed4bf247..f6f7075b6f2 100644 --- a/app/src/organisms/EmergencyStop/EstopMissingModal.tsx +++ b/app/src/organisms/EmergencyStop/EstopMissingModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/EmergencyStop/EstopTakeover.tsx b/app/src/organisms/EmergencyStop/EstopTakeover.tsx index f7f1977be5d..4792901caa4 100644 --- a/app/src/organisms/EmergencyStop/EstopTakeover.tsx +++ b/app/src/organisms/EmergencyStop/EstopTakeover.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { useEstopQuery } from '@opentrons/react-api-client' @@ -22,11 +22,11 @@ interface EstopTakeoverProps { } export function EstopTakeover({ robotName }: EstopTakeoverProps): JSX.Element { - const [estopEngaged, setEstopEngaged] = React.useState(false) + const [estopEngaged, setEstopEngaged] = useState(false) const [ isWaitingForLogicalDisengage, setIsWaitingForLogicalDisengage, - ] = React.useState(false) + ] = useState(false) const { data: estopStatus } = useEstopQuery({ refetchInterval: estopEngaged ? ESTOP_CURRENTLY_ENGAGED_REFETCH_INTERVAL_MS diff --git a/app/src/organisms/EmergencyStop/TouchscreenEstopMissingModal.stories.tsx b/app/src/organisms/EmergencyStop/TouchscreenEstopMissingModal.stories.tsx index 27421ac61c6..7b02f215d42 100644 --- a/app/src/organisms/EmergencyStop/TouchscreenEstopMissingModal.stories.tsx +++ b/app/src/organisms/EmergencyStop/TouchscreenEstopMissingModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' diff --git a/app/src/organisms/EmergencyStop/TouchscreenEstopPressedModal.stories.tsx b/app/src/organisms/EmergencyStop/TouchscreenEstopPressedModal.stories.tsx index 8e5f30575f9..bfc2c920a34 100644 --- a/app/src/organisms/EmergencyStop/TouchscreenEstopPressedModal.stories.tsx +++ b/app/src/organisms/EmergencyStop/TouchscreenEstopPressedModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/organisms/EmergencyStop/__tests__/EstopMissingModal.test.tsx b/app/src/organisms/EmergencyStop/__tests__/EstopMissingModal.test.tsx index bd6fd7bb7fb..c2ce7cea0e1 100644 --- a/app/src/organisms/EmergencyStop/__tests__/EstopMissingModal.test.tsx +++ b/app/src/organisms/EmergencyStop/__tests__/EstopMissingModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/EmergencyStop/__tests__/EstopPressedModal.test.tsx b/app/src/organisms/EmergencyStop/__tests__/EstopPressedModal.test.tsx index 3393c9072a1..124ea72b3ed 100644 --- a/app/src/organisms/EmergencyStop/__tests__/EstopPressedModal.test.tsx +++ b/app/src/organisms/EmergencyStop/__tests__/EstopPressedModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/EmergencyStop/__tests__/EstopTakeover.test.tsx b/app/src/organisms/EmergencyStop/__tests__/EstopTakeover.test.tsx index 4c3deece780..f50048f2cf4 100644 --- a/app/src/organisms/EmergencyStop/__tests__/EstopTakeover.test.tsx +++ b/app/src/organisms/EmergencyStop/__tests__/EstopTakeover.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect, vi } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/EmergencyStop/hooks.ts b/app/src/organisms/EmergencyStop/hooks.ts index 6ded6e100ad..775903e0dc9 100644 --- a/app/src/organisms/EmergencyStop/hooks.ts +++ b/app/src/organisms/EmergencyStop/hooks.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useContext } from 'react' import { EmergencyStopContext } from './EmergencyStopContext' import type { EmergencyStopContextType } from './EmergencyStopContext' @@ -7,7 +7,7 @@ export function useEstopContext(): EmergencyStopContextType { const { isEmergencyStopModalDismissed, setIsEmergencyStopModalDismissed, - } = React.useContext(EmergencyStopContext) + } = useContext(EmergencyStopContext) return { isEmergencyStopModalDismissed, diff --git a/app/src/organisms/ErrorRecoveryBanner/__tests__/ErrorRecoveryBanner.test.tsx b/app/src/organisms/ErrorRecoveryBanner/__tests__/ErrorRecoveryBanner.test.tsx index 17e0e5665db..fc234a52629 100644 --- a/app/src/organisms/ErrorRecoveryBanner/__tests__/ErrorRecoveryBanner.test.tsx +++ b/app/src/organisms/ErrorRecoveryBanner/__tests__/ErrorRecoveryBanner.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryBanner/index.tsx b/app/src/organisms/ErrorRecoveryBanner/index.tsx index a01ca4e4dbd..f8630d67824 100644 --- a/app/src/organisms/ErrorRecoveryBanner/index.tsx +++ b/app/src/organisms/ErrorRecoveryBanner/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' diff --git a/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx b/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx index 005665445ed..7fc948f42d9 100644 --- a/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect, useLayoutEffect } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' @@ -40,11 +40,11 @@ export interface UseERWizardResult { } export function useERWizard(): UseERWizardResult { - const [showERWizard, setShowERWizard] = React.useState(false) + const [showERWizard, setShowERWizard] = useState(false) // Because RunPausedSplash has access to some ER Wiz routes but is not a part of the ER wizard, the splash screen // is the "home" route as opposed to SelectRecoveryOption (accessed by pressing "go back" or "continue" enough times) // when recovery mode has not been launched. - const [hasLaunchedRecovery, setHasLaunchedRecovery] = React.useState(false) + const [hasLaunchedRecovery, setHasLaunchedRecovery] = useState(false) const toggleERWizard = ( isActive: boolean, @@ -103,7 +103,7 @@ export function ErrorRecoveryComponent( const { t } = useTranslation('error_recovery') const { showModal, toggleModal } = useErrorDetailsModal() - React.useEffect(() => { + useEffect(() => { if (showModal) { analytics.reportViewErrorDetailsEvent(route, step) } @@ -273,7 +273,7 @@ export function useInitialPipetteHome({ const { handleMotionRouting } = routeUpdateActions // Synchronously set the recovery route to "robot in motion" before initial render to prevent screen flicker on ER launch. - React.useLayoutEffect(() => { + useLayoutEffect(() => { if (hasLaunchedRecovery) { void handleMotionRouting(true) .then(() => homePipetteZAxes()) diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx index 3501f3b20a5..3aa1b0f7b74 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryDoorOpen.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryError.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryError.tsx index 748f7b903b3..985c7a456c7 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryError.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryError.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx index 2fba61f0293..4926355113f 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryInProgress.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/CancelRun.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/CancelRun.tsx index 5076ecce4fe..b3cdd5fe257 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/CancelRun.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/CancelRun.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { @@ -121,11 +121,11 @@ export function useOnCancelRun({ const { handleMotionRouting, proceedToRouteAndStep } = routeUpdateActions const { cancelRun } = recoveryCommands - const [hasUserClicked, setHasUserClicked] = React.useState(false) + const [hasUserClicked, setHasUserClicked] = useState(false) const showBtnLoadingState = hasUserClicked && isLoadingTipStatus - React.useEffect(() => { + useEffect(() => { if (hasUserClicked) { if (!isLoadingTipStatus) { if (areTipsAttached) { diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/FillWellAndSkip.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/FillWellAndSkip.tsx index 1b77ed1b26e..4fb2290d3ad 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/FillWellAndSkip.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/FillWellAndSkip.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx index 19e2608c97d..7cd9aee55c9 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/ManageTips.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryNewTips.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryNewTips.tsx index 9205d996639..ee398ac68e3 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryNewTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryNewTips.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetrySameTips.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetrySameTips.tsx index e4310b4cd83..93a0d84689d 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetrySameTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetrySameTips.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryStep.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryStep.tsx index 5831fd994f7..85d6324c6e6 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryStep.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/RetryStep.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SelectRecoveryOption.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SelectRecoveryOption.tsx index 7ababdcb4f8..09fa11e8071 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SelectRecoveryOption.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SelectRecoveryOption.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import head from 'lodash/head' import { useTranslation } from 'react-i18next' @@ -59,7 +59,7 @@ export function SelectRecoveryOptionHome({ const { determineTipStatus } = tipStatusUtils const { setSelectedRecoveryOption } = currentRecoveryOptionUtils const validRecoveryOptions = getRecoveryOptions(errorKind) - const [selectedRoute, setSelectedRoute] = React.useState( + const [selectedRoute, setSelectedRoute] = useState( head(validRecoveryOptions) as RecoveryRoute ) @@ -178,7 +178,7 @@ export function DesktopRecoveryOptions({ export function useCurrentTipStatus( determineTipStatus: () => Promise ): void { - React.useEffect(() => { + useEffect(() => { void determineTipStatus() }, []) } diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepNewTips.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepNewTips.tsx index 32deece693a..35d6804cab2 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepNewTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepNewTips.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepSameTips.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepSameTips.tsx index 6f55077e9db..5dddf70970d 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepSameTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/SkipStepSameTips.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/CancelRun.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/CancelRun.test.tsx index 1ca2cf3f114..cbf8126e353 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/CancelRun.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/CancelRun.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/FillWellAndSkip.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/FillWellAndSkip.test.tsx index 46a0450079b..ff8d017d7f3 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/FillWellAndSkip.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/FillWellAndSkip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach } from 'vitest' import { screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/IgnoreErrorSkipStep.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/IgnoreErrorSkipStep.test.tsx index 27f58054311..74869c259e5 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/IgnoreErrorSkipStep.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/IgnoreErrorSkipStep.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach } from 'vitest' import { screen, fireEvent, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/ManageTips.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/ManageTips.test.tsx index 369e7f552ab..f177138f586 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/ManageTips.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/ManageTips.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach } from 'vitest' import { screen, diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryNewTips.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryNewTips.test.tsx index 04307fea89a..d7f8469c028 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryNewTips.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryNewTips.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest' import { screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetrySameTips.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetrySameTips.test.tsx index ab0a57db3aa..4514c9cc350 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetrySameTips.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetrySameTips.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest' import { screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryStep.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryStep.test.tsx index c70f6a10af4..3f0c8179bab 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryStep.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/RetryStep.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest' import { screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SelectRecoveryOptions.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SelectRecoveryOptions.test.tsx index 0984efbe8cc..fec35b9bc92 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SelectRecoveryOptions.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SelectRecoveryOptions.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { screen, fireEvent } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepNewTips.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepNewTips.test.tsx index 6ceec1c0be0..73d098f5234 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepNewTips.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepNewTips.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest' import { screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepSameTips.test.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepSameTips.test.tsx index d6d01ada208..1a9b7b5dcd2 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepSameTips.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/SkipStepSameTips.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest' import { screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx index 33ac8a737c1..f178240c6ef 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoverySplash.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import styled, { css } from 'styled-components' import { useTranslation } from 'react-i18next' @@ -102,7 +102,7 @@ export function RecoverySplash(props: RecoverySplashProps): JSX.Element | null { // Resume recovery when the run when the door is closed. // The CTA/flow for handling a door open event within the ER wizard is different, and because this splash always renders // behind the wizard, we want to ensure we only implicitly resume recovery when only viewing the splash from this app. - React.useEffect(() => { + useEffect(() => { if ( runStatus === RUN_STATUS_AWAITING_RECOVERY_PAUSED && resumePausedRecovery diff --git a/app/src/organisms/ErrorRecoveryFlows/RecoveryTakeover.tsx b/app/src/organisms/ErrorRecoveryFlows/RecoveryTakeover.tsx index f42201a7f8f..d94732ea129 100644 --- a/app/src/organisms/ErrorRecoveryFlows/RecoveryTakeover.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/RecoveryTakeover.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { @@ -99,7 +99,7 @@ export function RecoveryTakeoverODD({ clearClientData, isRunStatusAwaitingRecovery, }: RecoveryTakeoverProps): JSX.Element { - const [showConfirmation, setShowConfirmation] = React.useState(false) + const [showConfirmation, setShowConfirmation] = useState(false) return ( { + useEffect(() => { if (isRunInRecoveryMode) { void queryClient.invalidateQueries([host, 'runs', runId]) } diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useDeckMapUtils.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useDeckMapUtils.ts index 3c8a45faabb..93caceaf4c2 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useDeckMapUtils.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useDeckMapUtils.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { getDeckDefFromRobotType, @@ -50,7 +50,7 @@ export function useDeckMapUtils({ const deckConfig = getSimplestDeckConfigForProtocol(protocolAnalysis) const deckDef = getDeckDefFromRobotType(robotType) - const currentModulesInfo = React.useMemo( + const currentModulesInfo = useMemo( () => getRunCurrentModulesInfo({ runRecord, @@ -60,7 +60,7 @@ export function useDeckMapUtils({ [runRecord, deckDef, protocolAnalysis] ) - const runCurrentModules = React.useMemo( + const runCurrentModules = useMemo( () => getRunCurrentModulesOnDeck({ failedLabwareUtils, @@ -69,12 +69,12 @@ export function useDeckMapUtils({ [runId, protocolAnalysis, runRecord, deckDef, failedLabwareUtils] ) - const currentLabwareInfo = React.useMemo( + const currentLabwareInfo = useMemo( () => getRunCurrentLabwareInfo({ runRecord, protocolAnalysis }), [runRecord, protocolAnalysis] ) - const runCurrentLabware = React.useMemo( + const runCurrentLabware = useMemo( () => getRunCurrentLabwareOnDeck({ failedLabwareUtils, diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useFailedLabwareUtils.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useFailedLabwareUtils.ts index b5f2866a154..092e066b432 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useFailedLabwareUtils.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useFailedLabwareUtils.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo, useState } from 'react' import without from 'lodash/without' import { @@ -56,7 +56,7 @@ export function useFailedLabwareUtils({ runCommands, runRecord, }: UseFailedLabwareUtilsProps): UseFailedLabwareUtilsResult { - const recentRelevantFailedLabwareCmd = React.useMemo( + const recentRelevantFailedLabwareCmd = useMemo( () => getRelevantFailedLabwareCmdFrom({ failedCommandByRunRecord, @@ -67,7 +67,7 @@ export function useFailedLabwareUtils({ const tipSelectionUtils = useTipSelectionUtils(recentRelevantFailedLabwareCmd) - const failedLabwareDetails = React.useMemo( + const failedLabwareDetails = useMemo( () => getFailedCmdRelevantLabware( protocolAnalysis, @@ -77,7 +77,7 @@ export function useFailedLabwareUtils({ [protocolAnalysis?.id, recentRelevantFailedLabwareCmd?.key] ) - const failedLabware = React.useMemo( + const failedLabware = useMemo( () => getFailedLabware(recentRelevantFailedLabwareCmd, runRecord), [recentRelevantFailedLabwareCmd?.key] ) @@ -185,7 +185,7 @@ interface UseTipSelectionUtilsResult { function useTipSelectionUtils( recentRelevantFailedLabwareCmd: FailedCommandRelevantLabware ): UseTipSelectionUtilsResult { - const [selectedLocs, setSelectedLocs] = React.useState(null) + const [selectedLocs, setSelectedLocs] = useState(null) const initialLocs = useInitialSelectedLocationsFrom( recentRelevantFailedLabwareCmd @@ -211,7 +211,7 @@ function useTipSelectionUtils( } // Use this labware to represent all tip racks for manual tip selection. - const tipSelectorDef = React.useMemo( + const tipSelectorDef = useMemo( () => getAllLabwareDefs().thermoscientificnunc96Wellplate1300UlV1, [] ) @@ -232,7 +232,7 @@ function useTipSelectionUtils( function useInitialSelectedLocationsFrom( recentRelevantFailedLabwareCmd: FailedCommandRelevantLabware ): WellGroup | null { - const [initialWells, setInitialWells] = React.useState(null) + const [initialWells, setInitialWells] = useState(null) // Note that while other commands may have a wellName associated with them, // we are only interested in wells for the purposes of tip picking up. diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryCommands.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryCommands.ts index 216ab0c217f..b57b5cc9aa2 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryCommands.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryCommands.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useCallback } from 'react' import head from 'lodash/head' import { @@ -82,7 +82,7 @@ export function useRecoveryCommands({ const { updateErrorRecoveryPolicy } = useUpdateErrorRecoveryPolicy(runId) const { makeSuccessToast } = recoveryToastUtils - const chainRunRecoveryCommands = React.useCallback( + const chainRunRecoveryCommands = useCallback( ( commands: CreateCommand[], continuePastFailure: boolean = false @@ -142,7 +142,7 @@ export function useRecoveryCommands({ : null } - const retryFailedCommand = React.useCallback((): Promise => { + const retryFailedCommand = useCallback((): Promise => { const { commandType, params } = failedCommandByRunRecord as FailedCommand // Null case is handled before command could be issued. return chainRunRecoveryCommands( [ @@ -154,12 +154,12 @@ export function useRecoveryCommands({ }, [chainRunRecoveryCommands, failedCommandByRunRecord?.key]) // Homes the Z-axis of all attached pipettes. - const homePipetteZAxes = React.useCallback((): Promise => { + const homePipetteZAxes = useCallback((): Promise => { return chainRunRecoveryCommands([HOME_PIPETTE_Z_AXES]) }, [chainRunRecoveryCommands]) // Pick up the user-selected tips - const pickUpTips = React.useCallback((): Promise => { + const pickUpTips = useCallback((): Promise => { const { selectedTipLocations, failedLabware } = failedLabwareUtils const pickUpTipCmd = buildPickUpTips( @@ -175,26 +175,26 @@ export function useRecoveryCommands({ } }, [chainRunRecoveryCommands, failedCommandByRunRecord, failedLabwareUtils]) - const resumeRun = React.useCallback((): void => { + const resumeRun = useCallback((): void => { void resumeRunFromRecovery(runId).then(() => { analytics.reportActionSelectedResult(selectedRecoveryOption, 'succeeded') makeSuccessToast() }) }, [runId, resumeRunFromRecovery, makeSuccessToast]) - const cancelRun = React.useCallback((): void => { + const cancelRun = useCallback((): void => { analytics.reportActionSelectedResult(selectedRecoveryOption, 'succeeded') stopRun(runId) }, [runId]) - const skipFailedCommand = React.useCallback((): void => { + const skipFailedCommand = useCallback((): void => { void resumeRunFromRecovery(runId).then(() => { analytics.reportActionSelectedResult(selectedRecoveryOption, 'succeeded') makeSuccessToast() }) }, [runId, resumeRunFromRecovery, makeSuccessToast]) - const ignoreErrorKindThisRun = React.useCallback((): Promise => { + const ignoreErrorKindThisRun = useCallback((): Promise => { if (failedCommandByRunRecord?.error != null) { const ignorePolicyRules = buildIgnorePolicyRules( failedCommandByRunRecord.commandType, diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryRouting.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryRouting.ts index dfc077e5564..cbf23a1393b 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryRouting.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryRouting.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { RECOVERY_MAP } from '../constants' @@ -28,12 +28,12 @@ export interface UseRecoveryRoutingResult { * */ export function useRecoveryRouting(): UseRecoveryRoutingResult { - const [recoveryMap, setRecoveryMap] = React.useState({ + const [recoveryMap, setRecoveryMap] = useState({ route: RECOVERY_MAP.OPTION_SELECTION.ROUTE, step: RECOVERY_MAP.OPTION_SELECTION.STEPS.SELECT, }) - const [subMap, setSubMap] = React.useState(null) + const [subMap, setSubMap] = useState(null) const currentRecoveryOptionUtils = useSelectedRecoveryOption() @@ -56,7 +56,7 @@ export function useSelectedRecoveryOption(): CurrentRecoveryOptionUtils { const [ selectedRecoveryOption, setSelectedRecoveryOption, - ] = React.useState(null) + ] = useState(null) return { selectedRecoveryOption, diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTakeover.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTakeover.ts index 417b6da1719..8e8b3466039 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTakeover.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTakeover.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useSelector } from 'react-redux' import { getUserId } from '/app/redux/config' @@ -40,7 +40,7 @@ export interface UseRecoveryTakeoverResult { export function useRecoveryTakeover( toggleERWiz: UseERWizardResult['toggleERWizard'] ): UseRecoveryTakeoverResult { - const [isActiveUser, setIsActiveUser] = React.useState(false) + const [isActiveUser, setIsActiveUser] = useState(false) const thisUserId = useSelector(getUserId) const { userId: activeId, intent } = useClientDataRecovery({ @@ -49,14 +49,14 @@ export function useRecoveryTakeover( const { updateWithIntent, clearClientData } = useUpdateClientDataRecovery() // Update the client's active user status implicitly if revoked by a different client. - React.useEffect(() => { + useEffect(() => { if (isActiveUser && activeId !== thisUserId) { setIsActiveUser(false) } }, [activeId]) // Not all dependencies added for intended behavior! // If Error Recovery unrenders and this client is the active user, revoke the client's active user status. - React.useEffect(() => { + useEffect(() => { return () => { if (isActiveUser) { clearClientData() diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTipStatus.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTipStatus.ts index 505ba6aff7c..698b8f6cf22 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTipStatus.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRecoveryTipStatus.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import head from 'lodash/head' import { useHost } from '@opentrons/react-api-client' @@ -28,11 +28,11 @@ export type RecoveryTipStatusUtils = TipAttachmentStatusResult & { export function useRecoveryTipStatus( props: UseRecoveryTipStatusProps ): RecoveryTipStatusUtils { - const [isLoadingTipStatus, setIsLoadingTipStatus] = React.useState(false) + const [isLoadingTipStatus, setIsLoadingTipStatus] = useState(false) const [ failedCommandPipette, setFailedCommandPipette, - ] = React.useState(null) + ] = useState(null) const host = useHost() const tipAttachmentStatusUtils = useTipAttachmentStatus({ diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRetainedFailedCommandBySource.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRetainedFailedCommandBySource.ts index 10231f5e0cc..c967d4968b1 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRetainedFailedCommandBySource.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRetainedFailedCommandBySource.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import type { RunTimeCommand } from '@opentrons/shared-data' import type { ErrorRecoveryFlowsProps } from '..' @@ -25,9 +25,9 @@ export function useRetainedFailedCommandBySource( const [ retainedFailedCommand, setRetainedFailedCommand, - ] = React.useState(null) + ] = useState(null) - React.useEffect(() => { + useEffect(() => { if (failedCommandByRunRecord !== null) { const failedCommandByAnalysis = protocolAnalysis?.commands.find( diff --git a/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts b/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts index 7b29947310b..8a5c19ce318 100644 --- a/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts +++ b/app/src/organisms/ErrorRecoveryFlows/hooks/useRouteUpdateActions.ts @@ -1,10 +1,10 @@ -import * as React from 'react' +import type { MutableRefObject } from 'react' +import { useRef, useCallback } from 'react' import last from 'lodash/last' + import head from 'lodash/head' import { INVALID, RECOVERY_MAP, STEP_ORDER } from '../constants' - -import type { MutableRefObject } from 'react' import type { IRecoveryMap, RecoveryRoute, @@ -56,9 +56,9 @@ export function useRouteUpdateActions( const { route: currentRoute, step: currentStep } = recoveryMap const { OPTION_SELECTION, ROBOT_IN_MOTION, ROBOT_DOOR_OPEN } = RECOVERY_MAP const { isDoorOpen } = doorStatusUtils - const stashedMapRef = React.useRef(null) + const stashedMapRef = useRef(null) - const goBackPrevStep = React.useCallback((): Promise => { + const goBackPrevStep = useCallback((): Promise => { return new Promise((resolve, reject) => { const { getPrevStep } = getRecoveryRouteNavigation(currentRoute) const updatedStep = getPrevStep(currentStep) @@ -73,7 +73,7 @@ export function useRouteUpdateActions( }) }, [currentStep, currentRoute, routeUpdateActionsParams]) - const proceedNextStep = React.useCallback((): Promise => { + const proceedNextStep = useCallback((): Promise => { return new Promise((resolve, reject) => { const { getNextStep } = getRecoveryRouteNavigation(currentRoute) const updatedStep = getNextStep(currentStep) @@ -88,7 +88,7 @@ export function useRouteUpdateActions( }) }, [currentStep, currentRoute, routeUpdateActionsParams]) - const proceedToRouteAndStep = React.useCallback( + const proceedToRouteAndStep = useCallback( (route: RecoveryRoute, step?: RouteStep): Promise => { return new Promise((resolve, reject) => { const newFlowSteps = STEP_ORDER[route] @@ -105,7 +105,7 @@ export function useRouteUpdateActions( // If the door is permitted on the current step, but the robot is about to move, we need to manually redirect users // to the door modal. - const checkDoorStatus = React.useCallback((): Promise => { + const checkDoorStatus = useCallback((): Promise => { return new Promise((resolve, reject) => { if (isDoorOpen) { stashedMapRef.current = { route: currentRoute, step: currentStep } @@ -126,7 +126,7 @@ export function useRouteUpdateActions( }) }, [currentRoute, currentStep, isDoorOpen]) - const setRobotInMotion = React.useCallback( + const setRobotInMotion = useCallback( (inMotion: boolean, robotMovingRoute?: RobotMovingRoute): Promise => { return new Promise((resolve, reject) => { if (inMotion) { diff --git a/app/src/organisms/ErrorRecoveryFlows/index.tsx b/app/src/organisms/ErrorRecoveryFlows/index.tsx index bebfbbf29b2..fce380ced9f 100644 --- a/app/src/organisms/ErrorRecoveryFlows/index.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { @@ -57,11 +57,9 @@ export function useErrorRecoveryFlows( runId: string, runStatus: RunStatus | null ): UseErrorRecoveryResult { - const [isERActive, setIsERActive] = React.useState(false) + const [isERActive, setIsERActive] = useState(false) // If client accesses a valid ER runs status besides AWAITING_RECOVERY but accesses it outside of Error Recovery flows, don't show ER. - const [hasSeenAwaitingRecovery, setHasSeenAwaitingRecovery] = React.useState( - false - ) + const [hasSeenAwaitingRecovery, setHasSeenAwaitingRecovery] = useState(false) const failedCommand = useCurrentlyRecoveringFrom(runId, runStatus) if ( diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/FailedStepNextStep.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/FailedStepNextStep.tsx index 8261e313848..bad7b536dfe 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/FailedStepNextStep.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/FailedStepNextStep.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { CategorizedStepContent } from '/app/molecules/InterventionModal' import type { RecoveryContentProps } from '../types' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/LeftColumnLabwareInfo.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/LeftColumnLabwareInfo.tsx index 756165ed425..80c0422a940 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/LeftColumnLabwareInfo.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/LeftColumnLabwareInfo.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { InterventionContent } from '/app/molecules/InterventionModal/InterventionContent' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryContentWrapper.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryContentWrapper.tsx index 53a66630047..9274079897f 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryContentWrapper.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryContentWrapper.tsx @@ -1,7 +1,7 @@ // TODO: replace this by making these props true of interventionmodal content wrappers // once error recovery uses interventionmodal consistently -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryFooterButtons.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryFooterButtons.tsx index b9aa7503baa..37e5cf54dde 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryFooterButtons.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryFooterButtons.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx index 901b5708974..2d73bba9e22 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryInterventionModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createPortal } from 'react-dom' import { css } from 'styled-components' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryRadioGroup.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryRadioGroup.tsx index 571f0b0333a..d200123d0b3 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryRadioGroup.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/RecoveryRadioGroup.tsx @@ -1,6 +1,4 @@ -import * as React from 'react' - -import type { ChangeEventHandler } from 'react' +import type { ChangeEventHandler, ReactNode, ComponentProps } from 'react' import { RadioGroup, SPACING, Flex } from '@opentrons/components' // note: this typescript stuff is so that e.currentTarget.value in the ChangeEventHandler @@ -12,12 +10,12 @@ export interface Target extends Omit { export type Options = Array<{ value: T - children: React.ReactNode + children: ReactNode }> export interface RecoveryRadioGroupProps extends Omit< - React.ComponentProps, + ComponentProps, 'labelTextClassName' | 'options' | 'onchange' > { options: Options diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/ReplaceTips.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/ReplaceTips.tsx index 08e600ae4be..936980dad80 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/ReplaceTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/ReplaceTips.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Flex } from '@opentrons/components' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/SelectTips.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/SelectTips.tsx index bd2e2210f79..0f55a5abe79 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/SelectTips.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/SelectTips.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { RECOVERY_MAP } from '../constants' @@ -27,7 +27,7 @@ export function SelectTips(props: RecoveryContentProps): JSX.Element | null { proceedNextStep, } = routeUpdateActions const { t } = useTranslation('error_recovery') - const [showTipSelectModal, setShowTipSelectModal] = React.useState(false) + const [showTipSelectModal, setShowTipSelectModal] = useState(false) const primaryBtnOnClick = (): Promise => { return handleMotionRouting(true, ROBOT_PICKING_UP_TIPS.ROUTE) diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx index 002ba1458f8..cd9d0c3d00e 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx index 2b9084cb0f4..cde82286c2f 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { WellSelection } from '../../WellSelection' import type { WellGroup } from '@opentrons/components' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/TipSelectionModal.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/TipSelectionModal.tsx index 6fe9106b1c4..57a5ac4c678 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/TipSelectionModal.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/TipSelectionModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/TwoColTextAndFailedStepNextStep.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/TwoColTextAndFailedStepNextStep.tsx index e5b69c4cc67..64702965d73 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/TwoColTextAndFailedStepNextStep.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/TwoColTextAndFailedStepNextStep.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ErrorDetailsModal.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ErrorDetailsModal.test.tsx index c2f80c429b1..e06baba1a80 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ErrorDetailsModal.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/ErrorDetailsModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect, vi } from 'vitest' import { screen, act, renderHook } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/LeftColumnLabwareInfo.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/LeftColumnLabwareInfo.test.tsx index 6a070e62e77..c714c0bc8a2 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/LeftColumnLabwareInfo.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/LeftColumnLabwareInfo.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect, vi } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/RecoveryFooterButtons.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/RecoveryFooterButtons.test.tsx index 3520851ac0b..6381d2b579a 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/RecoveryFooterButtons.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/RecoveryFooterButtons.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { screen, fireEvent } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/SelectTips.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/SelectTips.test.tsx index 631794dc6ec..88fd55e982d 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/SelectTips.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/SelectTips.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach } from 'vitest' import { screen, fireEvent, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StepInfo.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StepInfo.test.tsx index 9a305804c6c..d6fbb50c345 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StepInfo.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/StepInfo.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx index 96da4e8144d..d8f48776a9c 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelectionModal.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelectionModal.test.tsx index 50ed13e34d4..fed5a44d4ce 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelectionModal.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelectionModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/FirmwareUpdateModal/FirmwareUpdateTakeover.tsx b/app/src/organisms/FirmwareUpdateModal/FirmwareUpdateTakeover.tsx index d2cf969fbda..615165a6f26 100644 --- a/app/src/organisms/FirmwareUpdateModal/FirmwareUpdateTakeover.tsx +++ b/app/src/organisms/FirmwareUpdateModal/FirmwareUpdateTakeover.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { @@ -16,19 +16,18 @@ import type { Subsystem, InstrumentData } from '@opentrons/api-client' const POLL_INTERVAL_MS = 5000 export function FirmwareUpdateTakeover(): JSX.Element { - const [ - showUpdateNeededModal, - setShowUpdateNeededModal, - ] = React.useState(false) + const [showUpdateNeededModal, setShowUpdateNeededModal] = useState( + false + ) const [ initiatedSubsystemUpdate, setInitiatedSubsystemUpdate, - ] = React.useState(null) + ] = useState(null) const instrumentsData = useInstrumentsQuery({ refetchInterval: POLL_INTERVAL_MS, }).data?.data - const [instrumentsToUpdate, setInstrumentsToUpdate] = React.useState< + const [instrumentsToUpdate, setInstrumentsToUpdate] = useState< InstrumentData[] >([]) instrumentsData?.forEach(instrument => { @@ -41,7 +40,7 @@ export function FirmwareUpdateTakeover(): JSX.Element { setInstrumentsToUpdate([...instrumentsToUpdate, instrument]) } }) - const [indexToUpdate, setIndexToUpdate] = React.useState(0) + const [indexToUpdate, setIndexToUpdate] = useState(0) const { data: maintenanceRunData } = useNotifyCurrentMaintenanceRun({ refetchInterval: POLL_INTERVAL_MS, @@ -63,7 +62,7 @@ export function FirmwareUpdateTakeover(): JSX.Element { externalSubsystemUpdate?.id ?? null ) - React.useEffect(() => { + useEffect(() => { // in case instruments are updated elsewhere in the app, clear update needed list // when all instruments are ok but array has elements if ( diff --git a/app/src/organisms/FirmwareUpdateModal/UpdateInProgressModal.tsx b/app/src/organisms/FirmwareUpdateModal/UpdateInProgressModal.tsx index 9fa84bf49ba..a870f97bc67 100644 --- a/app/src/organisms/FirmwareUpdateModal/UpdateInProgressModal.tsx +++ b/app/src/organisms/FirmwareUpdateModal/UpdateInProgressModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/app/src/organisms/FirmwareUpdateModal/UpdateNeededModal.tsx b/app/src/organisms/FirmwareUpdateModal/UpdateNeededModal.tsx index de00b12655d..fa925c11e0b 100644 --- a/app/src/organisms/FirmwareUpdateModal/UpdateNeededModal.tsx +++ b/app/src/organisms/FirmwareUpdateModal/UpdateNeededModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { useTranslation, Trans } from 'react-i18next' import capitalize from 'lodash/capitalize' @@ -34,9 +34,9 @@ interface UpdateNeededModalProps { export function UpdateNeededModal(props: UpdateNeededModalProps): JSX.Element { const { onClose, shouldExit, subsystem, setInitiatedSubsystemUpdate } = props const { t } = useTranslation('firmware_update') - const [updateId, setUpdateId] = React.useState(null) + const [updateId, setUpdateId] = useState(null) // when we move to the next subsystem to update, set updateId back to null - React.useEffect(() => { + useEffect(() => { setUpdateId(null) }, [subsystem]) @@ -58,7 +58,7 @@ export function UpdateNeededModal(props: UpdateNeededModalProps): JSX.Element { const status = updateData?.data.updateStatus const ongoingUpdateId = updateData?.data.id - React.useEffect(() => { + useEffect(() => { if (status === 'done') { setInitiatedSubsystemUpdate(null) } diff --git a/app/src/organisms/FirmwareUpdateModal/UpdateResultsModal.tsx b/app/src/organisms/FirmwareUpdateModal/UpdateResultsModal.tsx index 439521b3710..e305d451c7f 100644 --- a/app/src/organisms/FirmwareUpdateModal/UpdateResultsModal.tsx +++ b/app/src/organisms/FirmwareUpdateModal/UpdateResultsModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation, Trans } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx b/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx index 08a0c8f6aad..bb205f3f852 100644 --- a/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx +++ b/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { act, screen, waitFor } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateTakeover.test.tsx b/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateTakeover.test.tsx index ca2ee5a9d90..6d619555834 100644 --- a/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateTakeover.test.tsx +++ b/app/src/organisms/FirmwareUpdateModal/__tests__/FirmwareUpdateTakeover.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateInProgressModal.test.tsx b/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateInProgressModal.test.tsx index 496da7421fb..f2ce6047481 100644 --- a/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateInProgressModal.test.tsx +++ b/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateInProgressModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateNeededModal.test.tsx b/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateNeededModal.test.tsx index 545854dbf1e..53c91223b47 100644 --- a/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateNeededModal.test.tsx +++ b/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateNeededModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateResultsModal.test.tsx b/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateResultsModal.test.tsx index 47095ebdc5e..29c5233db45 100644 --- a/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateResultsModal.test.tsx +++ b/app/src/organisms/FirmwareUpdateModal/__tests__/UpdateResultsModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/FirmwareUpdateModal/index.tsx b/app/src/organisms/FirmwareUpdateModal/index.tsx index cb449588ea1..0ed40409797 100644 --- a/app/src/organisms/FirmwareUpdateModal/index.tsx +++ b/app/src/organisms/FirmwareUpdateModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, @@ -73,8 +73,8 @@ export const FirmwareUpdateModal = ( description, isOnDevice, } = props - const [updateId, setUpdateId] = React.useState(null) - const [firmwareText, setFirmwareText] = React.useState(null) + const [updateId, setUpdateId] = useState(null) + const [firmwareText, setFirmwareText] = useState(null) const { data: attachedInstruments, refetch: refetchInstruments, @@ -92,7 +92,7 @@ export const FirmwareUpdateModal = ( (i): i is BadGripper | BadPipette => !i.ok && i.subsystem === subsystem ) ?? false - React.useEffect(() => { + useEffect(() => { setTimeout(() => { if (!updateNeeded) { setFirmwareText(proceedDescription) @@ -107,7 +107,7 @@ export const FirmwareUpdateModal = ( const { data: updateData } = useSubsystemUpdateQuery(updateId) const status = updateData?.data.updateStatus - React.useEffect(() => { + useEffect(() => { if ((status != null || updateNeeded) && firmwareText !== description) { setFirmwareText(description) } diff --git a/app/src/organisms/GripperCard/AboutGripperSlideout.tsx b/app/src/organisms/GripperCard/AboutGripperSlideout.tsx index 5cfb59e2c21..a95a409f759 100644 --- a/app/src/organisms/GripperCard/AboutGripperSlideout.tsx +++ b/app/src/organisms/GripperCard/AboutGripperSlideout.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { COLORS, diff --git a/app/src/organisms/GripperCard/__tests__/AboutGripperSlideout.test.tsx b/app/src/organisms/GripperCard/__tests__/AboutGripperSlideout.test.tsx index fa6fff2a552..9ad4381a40c 100644 --- a/app/src/organisms/GripperCard/__tests__/AboutGripperSlideout.test.tsx +++ b/app/src/organisms/GripperCard/__tests__/AboutGripperSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/GripperCard/__tests__/GripperCard.test.tsx b/app/src/organisms/GripperCard/__tests__/GripperCard.test.tsx index 32f523b82ca..40051f51bca 100644 --- a/app/src/organisms/GripperCard/__tests__/GripperCard.test.tsx +++ b/app/src/organisms/GripperCard/__tests__/GripperCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/GripperWizardFlows/BeforeBeginning.tsx b/app/src/organisms/GripperWizardFlows/BeforeBeginning.tsx index 463de1f6223..89395aeee10 100644 --- a/app/src/organisms/GripperWizardFlows/BeforeBeginning.tsx +++ b/app/src/organisms/GripperWizardFlows/BeforeBeginning.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { Trans, useTranslation } from 'react-i18next' import { COLORS, LegacyStyledText } from '@opentrons/components' import { EXTENSION } from '@opentrons/shared-data' @@ -76,7 +76,7 @@ export const BeforeBeginning = ( createdMaintenanceRunId, } = props const { t } = useTranslation(['gripper_wizard_flows', 'shared', 'branded']) - React.useEffect(() => { + useEffect(() => { if (createdMaintenanceRunId == null) { createMaintenanceRun({}) } diff --git a/app/src/organisms/GripperWizardFlows/ExitConfirmation.tsx b/app/src/organisms/GripperWizardFlows/ExitConfirmation.tsx index 3994536df78..28fb21635ac 100644 --- a/app/src/organisms/GripperWizardFlows/ExitConfirmation.tsx +++ b/app/src/organisms/GripperWizardFlows/ExitConfirmation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/GripperWizardFlows/GripperWizardFlows.stories.tsx b/app/src/organisms/GripperWizardFlows/GripperWizardFlows.stories.tsx index b960c38ce77..b5318daf5d8 100644 --- a/app/src/organisms/GripperWizardFlows/GripperWizardFlows.stories.tsx +++ b/app/src/organisms/GripperWizardFlows/GripperWizardFlows.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { Provider } from 'react-redux' import { createStore } from 'redux' diff --git a/app/src/organisms/GripperWizardFlows/MountGripper.tsx b/app/src/organisms/GripperWizardFlows/MountGripper.tsx index acda62ef28c..4a428ac69b1 100644 --- a/app/src/organisms/GripperWizardFlows/MountGripper.tsx +++ b/app/src/organisms/GripperWizardFlows/MountGripper.tsx @@ -14,7 +14,7 @@ import { } from '@opentrons/components' import { useInstrumentsQuery } from '@opentrons/react-api-client' import { css } from 'styled-components' -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { getIsOnDevice } from '/app/redux/config' import { SmallButton } from '/app/atoms/buttons' @@ -62,8 +62,8 @@ export const MountGripper = ( const { proceed, isRobotMoving } = props const { t } = useTranslation(['gripper_wizard_flows', 'shared', 'branded']) const isOnDevice = useSelector(getIsOnDevice) - const [showUnableToDetect, setShowUnableToDetect] = React.useState(false) - const [isPending, setIsPending] = React.useState(false) + const [showUnableToDetect, setShowUnableToDetect] = useState(false) + const [isPending, setIsPending] = useState(false) const { data: instrumentsQueryData, refetch } = useInstrumentsQuery({ refetchInterval: QUICK_GRIPPER_POLL_MS, }) diff --git a/app/src/organisms/GripperWizardFlows/MovePin.tsx b/app/src/organisms/GripperWizardFlows/MovePin.tsx index 1f62f769daa..1cf5153eaa5 100644 --- a/app/src/organisms/GripperWizardFlows/MovePin.tsx +++ b/app/src/organisms/GripperWizardFlows/MovePin.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation, Trans } from 'react-i18next' import { EXTENSION } from '@opentrons/shared-data' import { diff --git a/app/src/organisms/GripperWizardFlows/Success.tsx b/app/src/organisms/GripperWizardFlows/Success.tsx index 9d4e4a0ec14..bbd36b4ca37 100644 --- a/app/src/organisms/GripperWizardFlows/Success.tsx +++ b/app/src/organisms/GripperWizardFlows/Success.tsx @@ -1,5 +1,4 @@ import { useSelector } from 'react-redux' -import * as React from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/GripperWizardFlows/UnmountGripper.tsx b/app/src/organisms/GripperWizardFlows/UnmountGripper.tsx index f6a36e1cfed..273b211ec4d 100644 --- a/app/src/organisms/GripperWizardFlows/UnmountGripper.tsx +++ b/app/src/organisms/GripperWizardFlows/UnmountGripper.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { @@ -55,7 +55,7 @@ export const UnmountGripper = ( const { proceed, isRobotMoving, goBack, chainRunCommands } = props const { t } = useTranslation(['gripper_wizard_flows', 'shared', 'branded']) const isOnDevice = useSelector(getIsOnDevice) - const [isPending, setIsPending] = React.useState(false) + const [isPending, setIsPending] = useState(false) const { data: instrumentsQueryData, refetch } = useInstrumentsQuery({ refetchInterval: QUICK_GRIPPER_POLL_MS, }) @@ -63,10 +63,9 @@ export const UnmountGripper = ( (i): i is GripperData => i.instrumentType === 'gripper' && i.ok ) - const [ - showGripperStillDetected, - setShowGripperStillDetected, - ] = React.useState(false) + const [showGripperStillDetected, setShowGripperStillDetected] = useState( + false + ) const handleContinue = (): void => { setIsPending(true) refetch() diff --git a/app/src/organisms/GripperWizardFlows/__tests__/BeforeBeginning.test.tsx b/app/src/organisms/GripperWizardFlows/__tests__/BeforeBeginning.test.tsx index d2a2fda6b64..888e6ba30b2 100644 --- a/app/src/organisms/GripperWizardFlows/__tests__/BeforeBeginning.test.tsx +++ b/app/src/organisms/GripperWizardFlows/__tests__/BeforeBeginning.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen, waitFor } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/GripperWizardFlows/__tests__/ExitConfirmation.test.tsx b/app/src/organisms/GripperWizardFlows/__tests__/ExitConfirmation.test.tsx index 9865b9f3143..4b20f234bfb 100644 --- a/app/src/organisms/GripperWizardFlows/__tests__/ExitConfirmation.test.tsx +++ b/app/src/organisms/GripperWizardFlows/__tests__/ExitConfirmation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/GripperWizardFlows/__tests__/MountGripper.test.tsx b/app/src/organisms/GripperWizardFlows/__tests__/MountGripper.test.tsx index 6a351304f78..cb2020c5bfe 100644 --- a/app/src/organisms/GripperWizardFlows/__tests__/MountGripper.test.tsx +++ b/app/src/organisms/GripperWizardFlows/__tests__/MountGripper.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen, waitFor } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/GripperWizardFlows/__tests__/MovePin.test.tsx b/app/src/organisms/GripperWizardFlows/__tests__/MovePin.test.tsx index 136d7f01da1..ecf3ef6f3c0 100644 --- a/app/src/organisms/GripperWizardFlows/__tests__/MovePin.test.tsx +++ b/app/src/organisms/GripperWizardFlows/__tests__/MovePin.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect, afterEach } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/GripperWizardFlows/__tests__/Success.test.tsx b/app/src/organisms/GripperWizardFlows/__tests__/Success.test.tsx index ad42aca7da3..d071fda3c69 100644 --- a/app/src/organisms/GripperWizardFlows/__tests__/Success.test.tsx +++ b/app/src/organisms/GripperWizardFlows/__tests__/Success.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/GripperWizardFlows/__tests__/UnmountGripper.test.tsx b/app/src/organisms/GripperWizardFlows/__tests__/UnmountGripper.test.tsx index 64ddbe1e709..73c2d863366 100644 --- a/app/src/organisms/GripperWizardFlows/__tests__/UnmountGripper.test.tsx +++ b/app/src/organisms/GripperWizardFlows/__tests__/UnmountGripper.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fireEvent, screen, waitFor } from '@testing-library/react' diff --git a/app/src/organisms/GripperWizardFlows/index.tsx b/app/src/organisms/GripperWizardFlows/index.tsx index 3d9a536256d..ceb19eecbf3 100644 --- a/app/src/organisms/GripperWizardFlows/index.tsx +++ b/app/src/organisms/GripperWizardFlows/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -68,7 +68,7 @@ export function GripperWizardFlows( isLoading: isCommandLoading, } = useCreateMaintenanceCommandMutation() - const [createdMaintenanceRunId, setCreatedMaintenanceRunId] = React.useState< + const [createdMaintenanceRunId, setCreatedMaintenanceRunId] = useState< string | null >(null) @@ -77,7 +77,7 @@ export function GripperWizardFlows( const [ monitorMaintenanceRunForDeletion, setMonitorMaintenanceRunForDeletion, - ] = React.useState(false) + ] = useState(false) const { createTargetedMaintenanceRun, @@ -95,7 +95,7 @@ export function GripperWizardFlows( // this will close the modal in case the run was deleted by the terminate // activity modal on the ODD - React.useEffect(() => { + useEffect(() => { if ( createdMaintenanceRunId !== null && maintenanceRunData?.data.id === createdMaintenanceRunId @@ -116,8 +116,8 @@ export function GripperWizardFlows( closeFlow, ]) - const [isExiting, setIsExiting] = React.useState(false) - const [errorMessage, setErrorMessage] = React.useState(null) + const [isExiting, setIsExiting] = useState(false) + const [errorMessage, setErrorMessage] = useState(null) const handleClose = (): void => { if (props?.onComplete != null) { @@ -236,11 +236,8 @@ export const GripperWizard = ( const isOnDevice = useSelector(getIsOnDevice) const { t } = useTranslation('gripper_wizard_flows') const gripperWizardSteps = getGripperWizardSteps(flowType) - const [currentStepIndex, setCurrentStepIndex] = React.useState(0) - const [ - frontJawOffset, - setFrontJawOffset, - ] = React.useState(null) + const [currentStepIndex, setCurrentStepIndex] = useState(0) + const [frontJawOffset, setFrontJawOffset] = useState(null) const totalStepCount = gripperWizardSteps.length - 1 const currentStep = gripperWizardSteps?.[currentStepIndex] diff --git a/app/src/organisms/HowCalibrationWorksModal/__tests__/HowCalibrationWorksModal.test.tsx b/app/src/organisms/HowCalibrationWorksModal/__tests__/HowCalibrationWorksModal.test.tsx index 329d3ed3e5f..8eee1543c5a 100644 --- a/app/src/organisms/HowCalibrationWorksModal/__tests__/HowCalibrationWorksModal.test.tsx +++ b/app/src/organisms/HowCalibrationWorksModal/__tests__/HowCalibrationWorksModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/app/src/organisms/HowCalibrationWorksModal/index.tsx b/app/src/organisms/HowCalibrationWorksModal/index.tsx index e0f4bda2972..525b94cb636 100644 --- a/app/src/organisms/HowCalibrationWorksModal/index.tsx +++ b/app/src/organisms/HowCalibrationWorksModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/IncompatibleModule/IncompatibleModuleDesktopModalBody.tsx b/app/src/organisms/IncompatibleModule/IncompatibleModuleDesktopModalBody.tsx index 036c0db566f..a1fd7087b06 100644 --- a/app/src/organisms/IncompatibleModule/IncompatibleModuleDesktopModalBody.tsx +++ b/app/src/organisms/IncompatibleModule/IncompatibleModuleDesktopModalBody.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation, Trans } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/IncompatibleModule/IncompatibleModuleODDModalBody.tsx b/app/src/organisms/IncompatibleModule/IncompatibleModuleODDModalBody.tsx index fb08e1a8bcc..459871b4803 100644 --- a/app/src/organisms/IncompatibleModule/IncompatibleModuleODDModalBody.tsx +++ b/app/src/organisms/IncompatibleModule/IncompatibleModuleODDModalBody.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation, Trans } from 'react-i18next' import capitalize from 'lodash/capitalize' import { diff --git a/app/src/organisms/IncompatibleModule/IncompatibleModuleTakeover.tsx b/app/src/organisms/IncompatibleModule/IncompatibleModuleTakeover.tsx index 3be98ad14fc..52e75a0aead 100644 --- a/app/src/organisms/IncompatibleModule/IncompatibleModuleTakeover.tsx +++ b/app/src/organisms/IncompatibleModule/IncompatibleModuleTakeover.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { IncompatibleModuleODDModalBody } from './IncompatibleModuleODDModalBody' import { IncompatibleModuleDesktopModalBody } from './IncompatibleModuleDesktopModalBody' diff --git a/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleDesktopModalBody.test.tsx b/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleDesktopModalBody.test.tsx index 245073c15a6..41edc4439c6 100644 --- a/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleDesktopModalBody.test.tsx +++ b/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleDesktopModalBody.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi } from 'vitest' import { when } from 'vitest-when' diff --git a/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleODDModalBody.test.tsx b/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleODDModalBody.test.tsx index 1a6ce6854ae..e2d4e1a2af0 100644 --- a/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleODDModalBody.test.tsx +++ b/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleODDModalBody.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleTakeover.test.tsx b/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleTakeover.test.tsx index b8615e62d36..0a7f6b05db2 100644 --- a/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleTakeover.test.tsx +++ b/app/src/organisms/IncompatibleModule/__tests__/IncompatibleModuleTakeover.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, afterEach, expect, vi } from 'vitest' import { when } from 'vitest-when' diff --git a/app/src/organisms/IncompatibleModule/hooks/__tests__/useIncompatibleModulesAttached.test.tsx b/app/src/organisms/IncompatibleModule/hooks/__tests__/useIncompatibleModulesAttached.test.tsx index 970805c95c6..7e1a7342db1 100644 --- a/app/src/organisms/IncompatibleModule/hooks/__tests__/useIncompatibleModulesAttached.test.tsx +++ b/app/src/organisms/IncompatibleModule/hooks/__tests__/useIncompatibleModulesAttached.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { vi, it, expect, describe, beforeEach } from 'vitest' diff --git a/app/src/organisms/InstrumentInfo/__tests__/InstrumentInfo.test.tsx b/app/src/organisms/InstrumentInfo/__tests__/InstrumentInfo.test.tsx index ac6387cfc24..4b857d4d288 100644 --- a/app/src/organisms/InstrumentInfo/__tests__/InstrumentInfo.test.tsx +++ b/app/src/organisms/InstrumentInfo/__tests__/InstrumentInfo.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/InstrumentMountItem/LabeledMount.tsx b/app/src/organisms/InstrumentMountItem/LabeledMount.tsx index 668d7b960a0..20fe3941604 100644 --- a/app/src/organisms/InstrumentMountItem/LabeledMount.tsx +++ b/app/src/organisms/InstrumentMountItem/LabeledMount.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/app/src/organisms/InstrumentMountItem/__tests__/ProtocolInstrumentMountItem.test.tsx b/app/src/organisms/InstrumentMountItem/__tests__/ProtocolInstrumentMountItem.test.tsx index eb4aa97ca65..3ed34b5a7d6 100644 --- a/app/src/organisms/InstrumentMountItem/__tests__/ProtocolInstrumentMountItem.test.tsx +++ b/app/src/organisms/InstrumentMountItem/__tests__/ProtocolInstrumentMountItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' import { LEFT } from '@opentrons/shared-data' diff --git a/app/src/organisms/InterventionModal/InterventionCommandMessage.tsx b/app/src/organisms/InterventionModal/InterventionCommandMessage.tsx index 97fc9e7f69c..d9770e4a621 100644 --- a/app/src/organisms/InterventionModal/InterventionCommandMessage.tsx +++ b/app/src/organisms/InterventionModal/InterventionCommandMessage.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/InterventionModal/InterventionModal.stories.tsx b/app/src/organisms/InterventionModal/InterventionModal.stories.tsx index f9f13bb583e..ef378f49f70 100644 --- a/app/src/organisms/InterventionModal/InterventionModal.stories.tsx +++ b/app/src/organisms/InterventionModal/InterventionModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/organisms/InterventionModal/LabwareDisabledOverlay.tsx b/app/src/organisms/InterventionModal/LabwareDisabledOverlay.tsx index f301571f4f5..30c742c42fe 100644 --- a/app/src/organisms/InterventionModal/LabwareDisabledOverlay.tsx +++ b/app/src/organisms/InterventionModal/LabwareDisabledOverlay.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { COLORS } from '@opentrons/components' import type { LabwareDefinition2 } from '@opentrons/shared-data' diff --git a/app/src/organisms/InterventionModal/MoveLabwareInterventionContent.tsx b/app/src/organisms/InterventionModal/MoveLabwareInterventionContent.tsx index 29049bd82a0..d44a96ecfa8 100644 --- a/app/src/organisms/InterventionModal/MoveLabwareInterventionContent.tsx +++ b/app/src/organisms/InterventionModal/MoveLabwareInterventionContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/InterventionModal/PauseInterventionContent.tsx b/app/src/organisms/InterventionModal/PauseInterventionContent.tsx index 36f313873f6..72f09e522b6 100644 --- a/app/src/organisms/InterventionModal/PauseInterventionContent.tsx +++ b/app/src/organisms/InterventionModal/PauseInterventionContent.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' @@ -81,7 +81,7 @@ interface PauseHeaderProps { function PauseHeader({ startedAt }: PauseHeaderProps): JSX.Element { const { t, i18n } = useTranslation('run_details') - const [now, setNow] = React.useState(Date()) + const [now, setNow] = useState(Date()) useInterval( () => { setNow(Date()) diff --git a/app/src/organisms/InterventionModal/__tests__/InterventionCommandMesage.test.tsx b/app/src/organisms/InterventionModal/__tests__/InterventionCommandMesage.test.tsx index 48f2508435f..6f3a688b808 100644 --- a/app/src/organisms/InterventionModal/__tests__/InterventionCommandMesage.test.tsx +++ b/app/src/organisms/InterventionModal/__tests__/InterventionCommandMesage.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/InterventionModal/__tests__/InterventionCommandMessage.test.tsx b/app/src/organisms/InterventionModal/__tests__/InterventionCommandMessage.test.tsx index 48f2508435f..6f3a688b808 100644 --- a/app/src/organisms/InterventionModal/__tests__/InterventionCommandMessage.test.tsx +++ b/app/src/organisms/InterventionModal/__tests__/InterventionCommandMessage.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/InterventionModal/__tests__/InterventionModal.test.tsx b/app/src/organisms/InterventionModal/__tests__/InterventionModal.test.tsx index 2a6acb3be85..b343d316eef 100644 --- a/app/src/organisms/InterventionModal/__tests__/InterventionModal.test.tsx +++ b/app/src/organisms/InterventionModal/__tests__/InterventionModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, renderHook, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/InterventionModal/__tests__/LabwareDisabledOverlay.test.tsx b/app/src/organisms/InterventionModal/__tests__/LabwareDisabledOverlay.test.tsx index b217edb116d..d6b8760f368 100644 --- a/app/src/organisms/InterventionModal/__tests__/LabwareDisabledOverlay.test.tsx +++ b/app/src/organisms/InterventionModal/__tests__/LabwareDisabledOverlay.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { render, screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' import { COLORS } from '@opentrons/components' diff --git a/app/src/organisms/InterventionModal/index.tsx b/app/src/organisms/InterventionModal/index.tsx index cbc3ac5a1c7..c8372a83d91 100644 --- a/app/src/organisms/InterventionModal/index.tsx +++ b/app/src/organisms/InterventionModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' diff --git a/app/src/organisms/LabwareOffsetTabs/__tests__/LabwareOffsetTabs.test.tsx b/app/src/organisms/LabwareOffsetTabs/__tests__/LabwareOffsetTabs.test.tsx index 3029cecdd2f..d5d2a89538a 100644 --- a/app/src/organisms/LabwareOffsetTabs/__tests__/LabwareOffsetTabs.test.tsx +++ b/app/src/organisms/LabwareOffsetTabs/__tests__/LabwareOffsetTabs.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/LabwareOffsetTabs/index.tsx b/app/src/organisms/LabwareOffsetTabs/index.tsx index 36dd745f682..3ad81c51d01 100644 --- a/app/src/organisms/LabwareOffsetTabs/index.tsx +++ b/app/src/organisms/LabwareOffsetTabs/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { BORDERS, @@ -27,7 +27,7 @@ export function LabwareOffsetTabs({ ...styleProps }: LabwareOffsetTabsProps): JSX.Element { const { t } = useTranslation('labware_position_check') - const [currentTab, setCurrentTab] = React.useState('table') + const [currentTab, setCurrentTab] = useState('table') const activeTabComponent = { table: TableComponent, diff --git a/app/src/organisms/LabwarePositionCheck/ExitConfirmation.tsx b/app/src/organisms/LabwarePositionCheck/ExitConfirmation.tsx index 47cb0c11cab..ab6cb857035 100644 --- a/app/src/organisms/LabwarePositionCheck/ExitConfirmation.tsx +++ b/app/src/organisms/LabwarePositionCheck/ExitConfirmation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx b/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx index 96e6f920d47..69d9d6f1028 100644 --- a/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx +++ b/app/src/organisms/LabwarePositionCheck/FatalErrorModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import styled from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx b/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx index 3174ef5f9de..2671d98b611 100644 --- a/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx +++ b/app/src/organisms/LabwarePositionCheck/LabwarePositionCheckComponent.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect, useReducer } from 'react' import { createPortal } from 'react-dom' import isEqual from 'lodash/isEqual' import { useSelector } from 'react-redux' @@ -85,7 +85,7 @@ export const LabwarePositionCheckComponent = ( const [ monitorMaintenanceRunForDeletion, setMonitorMaintenanceRunForDeletion, - ] = React.useState(false) + ] = useState(false) const { data: maintenanceRunData } = useNotifyCurrentMaintenanceRun({ refetchInterval: RUN_REFETCH_INTERVAL, @@ -94,7 +94,7 @@ export const LabwarePositionCheckComponent = ( // this will close the modal in case the run was deleted by the terminate // activity modal on the ODD - React.useEffect(() => { + useEffect(() => { if ( maintenanceRunId !== null && maintenanceRunData?.data.id === maintenanceRunId @@ -114,14 +114,9 @@ export const LabwarePositionCheckComponent = ( setMaintenanceRunId, ]) - const [fatalError, setFatalError] = React.useState(null) - const [isApplyingOffsets, setIsApplyingOffsets] = React.useState( - false - ) - const [ - { workingOffsets, tipPickUpOffset }, - registerPosition, - ] = React.useReducer( + const [fatalError, setFatalError] = useState(null) + const [isApplyingOffsets, setIsApplyingOffsets] = useState(false) + const [{ workingOffsets, tipPickUpOffset }, registerPosition] = useReducer( ( state: { workingOffsets: WorkingOffset[] @@ -189,7 +184,7 @@ export const LabwarePositionCheckComponent = ( }, { workingOffsets: [], tipPickUpOffset: null } ) - const [isExiting, setIsExiting] = React.useState(false) + const [isExiting, setIsExiting] = useState(false) const { createMaintenanceCommand: createSilentCommand, } = useCreateMaintenanceCommandMutation() @@ -199,7 +194,7 @@ export const LabwarePositionCheckComponent = ( } = useChainMaintenanceCommands() const { createLabwareOffset } = useCreateLabwareOffsetMutation() - const [currentStepIndex, setCurrentStepIndex] = React.useState(0) + const [currentStepIndex, setCurrentStepIndex] = useState(0) const handleCleanUpAndClose = (): void => { setIsExiting(true) const dropTipToBeSafeCommands: DropTipCreateCommand[] = shouldUseMetalProbe diff --git a/app/src/organisms/LabwarePositionCheck/LiveOffsetValue.tsx b/app/src/organisms/LabwarePositionCheck/LiveOffsetValue.tsx index 294755a73ca..21b3af917f9 100644 --- a/app/src/organisms/LabwarePositionCheck/LiveOffsetValue.tsx +++ b/app/src/organisms/LabwarePositionCheck/LiveOffsetValue.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { ALIGN_CENTER, BORDERS, @@ -55,7 +55,7 @@ export function LiveOffsetValue(props: OffsetVectorProps): JSX.Element { > {[x, y, z].map((axis, index) => ( - + {axis.toFixed(1)} - + ))} diff --git a/app/src/organisms/LabwarePositionCheck/PrepareSpace.tsx b/app/src/organisms/LabwarePositionCheck/PrepareSpace.tsx index 12e630b6f00..c26af819b10 100644 --- a/app/src/organisms/LabwarePositionCheck/PrepareSpace.tsx +++ b/app/src/organisms/LabwarePositionCheck/PrepareSpace.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled, { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' diff --git a/app/src/organisms/LabwarePositionCheck/ResultsSummary.tsx b/app/src/organisms/LabwarePositionCheck/ResultsSummary.tsx index bbf9fd55e38..8fdd84884f7 100644 --- a/app/src/organisms/LabwarePositionCheck/ResultsSummary.tsx +++ b/app/src/organisms/LabwarePositionCheck/ResultsSummary.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo, Fragment } from 'react' import styled, { css } from 'styled-components' import { useSelector } from 'react-redux' import isEqual from 'lodash/isEqual' @@ -84,7 +84,7 @@ export const ResultsSummary = ( ) const isOnDevice = useSelector(getIsOnDevice) - const offsetsToApply = React.useMemo(() => { + const offsetsToApply = useMemo(() => { return workingOffsets.map( ({ initialPosition, finalPosition, labwareId, location }) => { const definitionUri = @@ -321,7 +321,7 @@ const OffsetTable = (props: OffsetTableProps): JSX.Element => { ) : ( {[vector.x, vector.y, vector.z].map((axis, index) => ( - + 0 ? SPACING.spacing8 : 0} @@ -333,7 +333,7 @@ const OffsetTable = (props: OffsetTableProps): JSX.Element => { {axis.toFixed(1)} - + ))} )} @@ -398,7 +398,7 @@ export const TerseOffsetTable = (props: OffsetTableProps): JSX.Element => { ) : ( {[vector.x, vector.y, vector.z].map((axis, index) => ( - + { > {axis.toFixed(1)} - + ))} )} diff --git a/app/src/organisms/LabwarePositionCheck/ReturnTip.tsx b/app/src/organisms/LabwarePositionCheck/ReturnTip.tsx index fe01316894d..8ba2f78d125 100644 --- a/app/src/organisms/LabwarePositionCheck/ReturnTip.tsx +++ b/app/src/organisms/LabwarePositionCheck/ReturnTip.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/LabwarePositionCheck/RobotMotionLoader.tsx b/app/src/organisms/LabwarePositionCheck/RobotMotionLoader.tsx index dbb5f6973f2..577dae6eff7 100644 --- a/app/src/organisms/LabwarePositionCheck/RobotMotionLoader.tsx +++ b/app/src/organisms/LabwarePositionCheck/RobotMotionLoader.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/organisms/LabwarePositionCheck/TerseOffsetTable.stories.tsx b/app/src/organisms/LabwarePositionCheck/TerseOffsetTable.stories.tsx index 3e324412002..da7c52de513 100644 --- a/app/src/organisms/LabwarePositionCheck/TerseOffsetTable.stories.tsx +++ b/app/src/organisms/LabwarePositionCheck/TerseOffsetTable.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ALIGN_FLEX_END, DIRECTION_COLUMN, diff --git a/app/src/organisms/LabwarePositionCheck/TipConfirmation.tsx b/app/src/organisms/LabwarePositionCheck/TipConfirmation.tsx index 35cdc3230e0..9a4df89265f 100644 --- a/app/src/organisms/LabwarePositionCheck/TipConfirmation.tsx +++ b/app/src/organisms/LabwarePositionCheck/TipConfirmation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_CENTER, COLORS, diff --git a/app/src/organisms/LabwarePositionCheck/TwoUpTileLayout.tsx b/app/src/organisms/LabwarePositionCheck/TwoUpTileLayout.tsx index 44ee775f25a..7c6cd309bb4 100644 --- a/app/src/organisms/LabwarePositionCheck/TwoUpTileLayout.tsx +++ b/app/src/organisms/LabwarePositionCheck/TwoUpTileLayout.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled, { css } from 'styled-components' import { DIRECTION_COLUMN, diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/CheckItem.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/CheckItem.test.tsx index cf0b61a8036..82fb4da874a 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/CheckItem.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/CheckItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/ExitConfirmation.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/ExitConfirmation.test.tsx index 2fd71e3acf0..6a93da71dc5 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/ExitConfirmation.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/ExitConfirmation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, afterEach, expect, vi } from 'vitest' import { ExitConfirmation } from '../ExitConfirmation' diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/PickUpTip.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/PickUpTip.test.tsx index c852c5eee5a..c23e1c1af2c 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/PickUpTip.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/PickUpTip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen, waitFor } from '@testing-library/react' import { it, describe, beforeEach, vi, afterEach, expect } from 'vitest' import { FLEX_ROBOT_TYPE, HEATERSHAKER_MODULE_V1 } from '@opentrons/shared-data' diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/ResultsSummary.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/ResultsSummary.test.tsx index e66d900e76e..24101904de4 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/ResultsSummary.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/ResultsSummary.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, afterEach, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/ReturnTip.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/ReturnTip.test.tsx index 0c44d4ecf89..0af86097f9c 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/ReturnTip.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/ReturnTip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/RobotMotionLoader.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/RobotMotionLoader.test.tsx index f12c52b07d4..fc2c49aa8f5 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/RobotMotionLoader.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/RobotMotionLoader.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/TipConfirmation.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/TipConfirmation.test.tsx index 3217cea0dbe..8f8878a7122 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/TipConfirmation.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/TipConfirmation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, afterEach, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { TipConfirmation } from '../TipConfirmation' diff --git a/app/src/organisms/LabwarePositionCheck/__tests__/useLaunchLPC.test.tsx b/app/src/organisms/LabwarePositionCheck/__tests__/useLaunchLPC.test.tsx index b10580ab3d3..fb983097d01 100644 --- a/app/src/organisms/LabwarePositionCheck/__tests__/useLaunchLPC.test.tsx +++ b/app/src/organisms/LabwarePositionCheck/__tests__/useLaunchLPC.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import configureStore from 'redux-mock-store' import { when } from 'vitest-when' diff --git a/app/src/organisms/LabwarePositionCheck/useLaunchLPC.tsx b/app/src/organisms/LabwarePositionCheck/useLaunchLPC.tsx index ae90b665c96..c3262af8225 100644 --- a/app/src/organisms/LabwarePositionCheck/useLaunchLPC.tsx +++ b/app/src/organisms/LabwarePositionCheck/useLaunchLPC.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useCreateMaintenanceRunLabwareDefinitionMutation, @@ -29,9 +29,7 @@ export function useLaunchLPC( isLoading: isDeletingMaintenanceRun, } = useDeleteMaintenanceRunMutation() const mostRecentAnalysis = useMostRecentCompletedAnalysis(runId) - const [maintenanceRunId, setMaintenanceRunId] = React.useState( - null - ) + const [maintenanceRunId, setMaintenanceRunId] = useState(null) const currentOffsets = runRecord?.data?.labwareOffsets ?? [] const { createLabwareDefinition, diff --git a/app/src/organisms/LiquidsLabwareDetailsModal/LiquidDetailCard.tsx b/app/src/organisms/LiquidsLabwareDetailsModal/LiquidDetailCard.tsx index 0e3f97fb525..cb1591dc72f 100644 --- a/app/src/organisms/LiquidsLabwareDetailsModal/LiquidDetailCard.tsx +++ b/app/src/organisms/LiquidsLabwareDetailsModal/LiquidDetailCard.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { css } from 'styled-components' import { diff --git a/app/src/organisms/LiquidsLabwareDetailsModal/LiquidsLabwareDetailsModal.tsx b/app/src/organisms/LiquidsLabwareDetailsModal/LiquidsLabwareDetailsModal.tsx index 804b0aae47d..62b5e3cf435 100644 --- a/app/src/organisms/LiquidsLabwareDetailsModal/LiquidsLabwareDetailsModal.tsx +++ b/app/src/organisms/LiquidsLabwareDetailsModal/LiquidsLabwareDetailsModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { css } from 'styled-components' @@ -48,7 +48,7 @@ export const LiquidsLabwareDetailsModal = ( const { liquidId, labwareId, runId, closeModal } = props const { t } = useTranslation('protocol_setup') const isOnDevice = useSelector(getIsOnDevice) - const currentLiquidRef = React.useRef(null) + const currentLiquidRef = useRef(null) const protocolData = useMostRecentCompletedAnalysis(runId) const commands = protocolData?.commands ?? [] const liquids = parseLiquidsInLoadOrder( @@ -65,7 +65,7 @@ export const LiquidsLabwareDetailsModal = ( const filteredLiquidsInLoadOrder = liquids.filter(liquid => { return Object.keys(labwareInfo).some(key => key === liquid.id) }) - const [selectedValue, setSelectedValue] = React.useState( + const [selectedValue, setSelectedValue] = useState( liquidId ?? filteredLiquidsInLoadOrder[0].id ) @@ -79,7 +79,7 @@ export const LiquidsLabwareDetailsModal = ( const scrollToCurrentItem = (): void => { currentLiquidRef.current?.scrollIntoView({ behavior: 'smooth' }) } - React.useEffect(() => { + useEffect(() => { scrollToCurrentItem() }, []) const HIDE_SCROLLBAR = css` diff --git a/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidDetailCard.test.tsx b/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidDetailCard.test.tsx index 8ed860659a5..a96c8128897 100644 --- a/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidDetailCard.test.tsx +++ b/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidDetailCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidsLabwareDetailsModal.test.tsx b/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidsLabwareDetailsModal.test.tsx index 93f8a903009..54b8239da47 100644 --- a/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidsLabwareDetailsModal.test.tsx +++ b/app/src/organisms/LiquidsLabwareDetailsModal/__tests__/LiquidsLabwareDetailsModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/LocationConflictModal/ChooseModuleToConfigureModal.tsx b/app/src/organisms/LocationConflictModal/ChooseModuleToConfigureModal.tsx index 31f198c000f..b91a63c7610 100644 --- a/app/src/organisms/LocationConflictModal/ChooseModuleToConfigureModal.tsx +++ b/app/src/organisms/LocationConflictModal/ChooseModuleToConfigureModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/LocationConflictModal/LocationConflictModal.tsx b/app/src/organisms/LocationConflictModal/LocationConflictModal.tsx index 7113ba5ddec..f5c272ea673 100644 --- a/app/src/organisms/LocationConflictModal/LocationConflictModal.tsx +++ b/app/src/organisms/LocationConflictModal/LocationConflictModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { Trans, useTranslation } from 'react-i18next' import { useUpdateDeckConfigurationMutation } from '@opentrons/react-api-client' @@ -72,7 +72,7 @@ export const LocationConflictModal = ( } = props const { t, i18n } = useTranslation(['protocol_setup', 'shared']) - const [showModuleSelect, setShowModuleSelect] = React.useState(false) + const [showModuleSelect, setShowModuleSelect] = useState(false) const deckConfig = useNotifyDeckConfigurationQuery().data ?? [] const { updateDeckConfiguration } = useUpdateDeckConfigurationMutation() const deckConfigurationAtLocationFixtureId = deckConfig.find( diff --git a/app/src/organisms/LocationConflictModal/__tests__/LocationConflictModal.test.tsx b/app/src/organisms/LocationConflictModal/__tests__/LocationConflictModal.test.tsx index dfc61ee1bc7..207caa02a1b 100644 --- a/app/src/organisms/LocationConflictModal/__tests__/LocationConflictModal.test.tsx +++ b/app/src/organisms/LocationConflictModal/__tests__/LocationConflictModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen, fireEvent } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ModuleCard/AboutModuleSlideout.tsx b/app/src/organisms/ModuleCard/AboutModuleSlideout.tsx index ba079b33a57..8fedee8299a 100644 --- a/app/src/organisms/ModuleCard/AboutModuleSlideout.tsx +++ b/app/src/organisms/ModuleCard/AboutModuleSlideout.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { RUN_STATUS_RUNNING, RUN_STATUS_FINISHING } from '@opentrons/api-client' @@ -40,7 +40,7 @@ export const AboutModuleSlideout = ( const { i18n, t } = useTranslation(['device_details', 'shared']) const moduleName = getModuleDisplayName(module.moduleModel) const runStatus = useCurrentRunStatus() - const [showBanner, setShowBanner] = React.useState(true) + const [showBanner, setShowBanner] = useState(true) const isDisabled = runStatus === RUN_STATUS_RUNNING || runStatus === RUN_STATUS_FINISHING diff --git a/app/src/organisms/ModuleCard/AbsorbanceReaderData.tsx b/app/src/organisms/ModuleCard/AbsorbanceReaderData.tsx index 7a6a77d0ce3..72deca8bcac 100644 --- a/app/src/organisms/ModuleCard/AbsorbanceReaderData.tsx +++ b/app/src/organisms/ModuleCard/AbsorbanceReaderData.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { TYPOGRAPHY, LegacyStyledText } from '@opentrons/components' import type { AbsorbanceReaderModule } from '/app/redux/modules/types' diff --git a/app/src/organisms/ModuleCard/AbsorbanceReaderSlideout.tsx b/app/src/organisms/ModuleCard/AbsorbanceReaderSlideout.tsx index 5ef3ffd3845..8cfd8597135 100644 --- a/app/src/organisms/ModuleCard/AbsorbanceReaderSlideout.tsx +++ b/app/src/organisms/ModuleCard/AbsorbanceReaderSlideout.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { getModuleDisplayName } from '@opentrons/shared-data' import { SPACING, LegacyStyledText, TYPOGRAPHY } from '@opentrons/components' diff --git a/app/src/organisms/ModuleCard/Collapsible.tsx b/app/src/organisms/ModuleCard/Collapsible.tsx index 44b7c883b8a..cc15a88d4a0 100644 --- a/app/src/organisms/ModuleCard/Collapsible.tsx +++ b/app/src/organisms/ModuleCard/Collapsible.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/app/src/organisms/ModuleCard/ErrorInfo.tsx b/app/src/organisms/ModuleCard/ErrorInfo.tsx index 249490b9131..77476e23307 100644 --- a/app/src/organisms/ModuleCard/ErrorInfo.tsx +++ b/app/src/organisms/ModuleCard/ErrorInfo.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { @@ -30,7 +30,7 @@ interface ErrorInfoProps { export function ErrorInfo(props: ErrorInfoProps): JSX.Element | null { const { attachedModule } = props const { t } = useTranslation(['device_details', 'shared', 'branded']) - const [showErrorDetails, setShowErrorDetails] = React.useState(false) + const [showErrorDetails, setShowErrorDetails] = useState(false) let isError: boolean = false // extend this logic when we know how to tell when Mag/Temp modules are in error state diff --git a/app/src/organisms/ModuleCard/FirmwareUpdateFailedModal.tsx b/app/src/organisms/ModuleCard/FirmwareUpdateFailedModal.tsx index 180e9574b72..47e95f8bf96 100644 --- a/app/src/organisms/ModuleCard/FirmwareUpdateFailedModal.tsx +++ b/app/src/organisms/ModuleCard/FirmwareUpdateFailedModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { getModuleDisplayName } from '@opentrons/shared-data' import { diff --git a/app/src/organisms/ModuleCard/HeaterShakerModuleData.tsx b/app/src/organisms/ModuleCard/HeaterShakerModuleData.tsx index 668f8f66fd0..67bed6f6e5d 100644 --- a/app/src/organisms/ModuleCard/HeaterShakerModuleData.tsx +++ b/app/src/organisms/ModuleCard/HeaterShakerModuleData.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { COLORS, diff --git a/app/src/organisms/ModuleCard/MagneticModuleData.tsx b/app/src/organisms/ModuleCard/MagneticModuleData.tsx index 580731eeab8..f9282505b8a 100644 --- a/app/src/organisms/ModuleCard/MagneticModuleData.tsx +++ b/app/src/organisms/ModuleCard/MagneticModuleData.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { COLORS, TYPOGRAPHY, LegacyStyledText } from '@opentrons/components' import { MAGNETIC_MODULE_V2 } from '@opentrons/shared-data' diff --git a/app/src/organisms/ModuleCard/MagneticModuleSlideout.tsx b/app/src/organisms/ModuleCard/MagneticModuleSlideout.tsx index b4fc4dac9bc..66e428c682d 100644 --- a/app/src/organisms/ModuleCard/MagneticModuleSlideout.tsx +++ b/app/src/organisms/ModuleCard/MagneticModuleSlideout.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useCreateLiveCommandMutation } from '@opentrons/react-api-client' @@ -73,9 +73,9 @@ export const MagneticModuleSlideout = ( const { module, isExpanded, onCloseClick } = props const { t } = useTranslation('device_details') const { createLiveCommand } = useCreateLiveCommandMutation() - const [engageHeightValue, setEngageHeightValue] = React.useState< - string | null - >(null) + const [engageHeightValue, setEngageHeightValue] = useState( + null + ) const moduleName = getModuleDisplayName(module.moduleModel) const info = getInfoByModel(module.moduleModel) diff --git a/app/src/organisms/ModuleCard/ModuleOverflowMenu.tsx b/app/src/organisms/ModuleCard/ModuleOverflowMenu.tsx index fe27d5376c6..a451846c2fb 100644 --- a/app/src/organisms/ModuleCard/ModuleOverflowMenu.tsx +++ b/app/src/organisms/ModuleCard/ModuleOverflowMenu.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useTranslation } from 'react-i18next' import { @@ -148,7 +148,7 @@ export const ModuleOverflowMenu = ( {menuOverflowItemsByModuleType[module.moduleType].map( (item: any, index: number) => { return ( - + item.onClick(item.isSecondary)} disabled={item.disabledReason || isDisabled} @@ -157,7 +157,7 @@ export const ModuleOverflowMenu = ( {item.setSetting} {item.menuButtons} - + ) } )} diff --git a/app/src/organisms/ModuleCard/ModuleSetupModal.tsx b/app/src/organisms/ModuleCard/ModuleSetupModal.tsx index 218bfe4dd6b..e4a9d6d458d 100644 --- a/app/src/organisms/ModuleCard/ModuleSetupModal.tsx +++ b/app/src/organisms/ModuleCard/ModuleSetupModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' import code from '/app/assets/images/module_instruction_code.png' diff --git a/app/src/organisms/ModuleCard/TemperatureModuleData.tsx b/app/src/organisms/ModuleCard/TemperatureModuleData.tsx index 369b7999552..a5ba2bcbd9f 100644 --- a/app/src/organisms/ModuleCard/TemperatureModuleData.tsx +++ b/app/src/organisms/ModuleCard/TemperatureModuleData.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { COLORS, diff --git a/app/src/organisms/ModuleCard/TemperatureModuleSlideout.tsx b/app/src/organisms/ModuleCard/TemperatureModuleSlideout.tsx index c3445efaf06..18928ecae10 100644 --- a/app/src/organisms/ModuleCard/TemperatureModuleSlideout.tsx +++ b/app/src/organisms/ModuleCard/TemperatureModuleSlideout.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useCreateLiveCommandMutation } from '@opentrons/react-api-client' @@ -37,9 +37,7 @@ export const TemperatureModuleSlideout = ( const { t } = useTranslation('device_details') const { createLiveCommand } = useCreateLiveCommandMutation() const name = getModuleDisplayName(module.moduleModel) - const [temperatureValue, setTemperatureValue] = React.useState( - null - ) + const [temperatureValue, setTemperatureValue] = useState(null) const handleSubmitTemperature = (): void => { if (temperatureValue != null) { const saveTempCommand: TemperatureModuleSetTargetTemperatureCreateCommand = { diff --git a/app/src/organisms/ModuleCard/TestShakeSlideout.tsx b/app/src/organisms/ModuleCard/TestShakeSlideout.tsx index 53847cddea3..d7bfb0e97a9 100644 --- a/app/src/organisms/ModuleCard/TestShakeSlideout.tsx +++ b/app/src/organisms/ModuleCard/TestShakeSlideout.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -66,11 +66,10 @@ export const TestShakeSlideout = ( }) const { toggleLatch, isLatchClosed } = useLatchControls(module) const configHasHeaterShakerAttached = useSelector(getIsHeaterShakerAttached) - const [shakeValue, setShakeValue] = React.useState(null) - const [ - showModuleSetupModal, - setShowModuleSetupModal, - ] = React.useState(false) + const [shakeValue, setShakeValue] = useState(null) + const [showModuleSetupModal, setShowModuleSetupModal] = useState( + false + ) const isShaking = module.data.speedStatus !== 'idle' const setShakeCommand: HeaterShakerSetAndWaitForShakeSpeedCreateCommand = { diff --git a/app/src/organisms/ModuleCard/ThermocyclerModuleData.tsx b/app/src/organisms/ModuleCard/ThermocyclerModuleData.tsx index f3d7d910301..c0eed06384d 100644 --- a/app/src/organisms/ModuleCard/ThermocyclerModuleData.tsx +++ b/app/src/organisms/ModuleCard/ThermocyclerModuleData.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { StatusLabel } from '/app/atoms/StatusLabel' import { diff --git a/app/src/organisms/ModuleCard/ThermocyclerModuleSlideout.tsx b/app/src/organisms/ModuleCard/ThermocyclerModuleSlideout.tsx index c393336357e..e0bf348022c 100644 --- a/app/src/organisms/ModuleCard/ThermocyclerModuleSlideout.tsx +++ b/app/src/organisms/ModuleCard/ThermocyclerModuleSlideout.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { CELSIUS, @@ -40,7 +40,7 @@ export const ThermocyclerModuleSlideout = ( ): JSX.Element | null => { const { module, onCloseClick, isExpanded, isSecondaryTemp } = props const { t } = useTranslation('device_details') - const [tempValue, setTempValue] = React.useState(null) + const [tempValue, setTempValue] = useState(null) const { createLiveCommand } = useCreateLiveCommandMutation() const moduleName = getModuleDisplayName(module.moduleModel) const modulePart = isSecondaryTemp ? 'Lid' : 'Block' diff --git a/app/src/organisms/ModuleCard/__tests__/AboutModuleSlideout.test.tsx b/app/src/organisms/ModuleCard/__tests__/AboutModuleSlideout.test.tsx index 19f49c412c8..c7f90a42b23 100644 --- a/app/src/organisms/ModuleCard/__tests__/AboutModuleSlideout.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/AboutModuleSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/Collapsible.test.tsx b/app/src/organisms/ModuleCard/__tests__/Collapsible.test.tsx index e312a177459..3db479e3228 100644 --- a/app/src/organisms/ModuleCard/__tests__/Collapsible.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/Collapsible.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/ConfirmAttachmentModal.test.tsx b/app/src/organisms/ModuleCard/__tests__/ConfirmAttachmentModal.test.tsx index 73e8f495e9c..ccc81bcb167 100644 --- a/app/src/organisms/ModuleCard/__tests__/ConfirmAttachmentModal.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/ConfirmAttachmentModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/ModuleCard/__tests__/ErrorInfo.test.tsx b/app/src/organisms/ModuleCard/__tests__/ErrorInfo.test.tsx index 467f512ef08..bde80a0d7d2 100644 --- a/app/src/organisms/ModuleCard/__tests__/ErrorInfo.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/ErrorInfo.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/ModuleCard/__tests__/FirmwareUpdateFailedModal.test.tsx b/app/src/organisms/ModuleCard/__tests__/FirmwareUpdateFailedModal.test.tsx index 498483c7b67..13395bcff69 100644 --- a/app/src/organisms/ModuleCard/__tests__/FirmwareUpdateFailedModal.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/FirmwareUpdateFailedModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/ModuleCard/__tests__/HeaterShakerModuleData.test.tsx b/app/src/organisms/ModuleCard/__tests__/HeaterShakerModuleData.test.tsx index 7128c46f55d..348fdb614d4 100644 --- a/app/src/organisms/ModuleCard/__tests__/HeaterShakerModuleData.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/HeaterShakerModuleData.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/ModuleCard/__tests__/HeaterShakerSlideout.test.tsx b/app/src/organisms/ModuleCard/__tests__/HeaterShakerSlideout.test.tsx index 74f770bb235..883d5b6bb7c 100644 --- a/app/src/organisms/ModuleCard/__tests__/HeaterShakerSlideout.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/HeaterShakerSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/MagneticModuleData.test.tsx b/app/src/organisms/ModuleCard/__tests__/MagneticModuleData.test.tsx index 594b17f1df0..b6534d233e3 100644 --- a/app/src/organisms/ModuleCard/__tests__/MagneticModuleData.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/MagneticModuleData.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { afterEach, beforeEach, describe, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/MagneticModuleSlideout.test.tsx b/app/src/organisms/ModuleCard/__tests__/MagneticModuleSlideout.test.tsx index 2820cb7651c..fa10546af90 100644 --- a/app/src/organisms/ModuleCard/__tests__/MagneticModuleSlideout.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/MagneticModuleSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { COLORS } from '@opentrons/components' diff --git a/app/src/organisms/ModuleCard/__tests__/ModuleCard.test.tsx b/app/src/organisms/ModuleCard/__tests__/ModuleCard.test.tsx index e426c310216..a0628e1ddc2 100644 --- a/app/src/organisms/ModuleCard/__tests__/ModuleCard.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/ModuleCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/ModuleOverflowMenu.test.tsx b/app/src/organisms/ModuleCard/__tests__/ModuleOverflowMenu.test.tsx index c840dfe1cff..0bb611f585e 100644 --- a/app/src/organisms/ModuleCard/__tests__/ModuleOverflowMenu.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/ModuleOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/ModuleSetupModal.test.tsx b/app/src/organisms/ModuleCard/__tests__/ModuleSetupModal.test.tsx index 3a8dab77008..7f24a60bc7c 100644 --- a/app/src/organisms/ModuleCard/__tests__/ModuleSetupModal.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/ModuleSetupModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/TemperatureModuleData.test.tsx b/app/src/organisms/ModuleCard/__tests__/TemperatureModuleData.test.tsx index 603388807c3..5b851ce5796 100644 --- a/app/src/organisms/ModuleCard/__tests__/TemperatureModuleData.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/TemperatureModuleData.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/TemperatureModuleSlideout.test.tsx b/app/src/organisms/ModuleCard/__tests__/TemperatureModuleSlideout.test.tsx index 65fd489abc6..ce65306741d 100644 --- a/app/src/organisms/ModuleCard/__tests__/TemperatureModuleSlideout.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/TemperatureModuleSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/TestShakeSlideout.test.tsx b/app/src/organisms/ModuleCard/__tests__/TestShakeSlideout.test.tsx index 02e3509b078..f11816df8b6 100644 --- a/app/src/organisms/ModuleCard/__tests__/TestShakeSlideout.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/TestShakeSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen, waitFor } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleData.test.tsx b/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleData.test.tsx index f4289bf175c..0885c74bb5d 100644 --- a/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleData.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleData.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleSlideout.test.tsx b/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleSlideout.test.tsx index 5996f43a6ab..d93a1b1f607 100644 --- a/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleSlideout.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/ThermocyclerModuleSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ModuleCard/__tests__/hooks.test.tsx b/app/src/organisms/ModuleCard/__tests__/hooks.test.tsx index 844a4f350c8..f363eb7c0e0 100644 --- a/app/src/organisms/ModuleCard/__tests__/hooks.test.tsx +++ b/app/src/organisms/ModuleCard/__tests__/hooks.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { when } from 'vitest-when' import { createStore } from 'redux' diff --git a/app/src/organisms/ModuleCard/hooks.tsx b/app/src/organisms/ModuleCard/hooks.tsx index f0b8d5e1d37..b0322e9ebc1 100644 --- a/app/src/organisms/ModuleCard/hooks.tsx +++ b/app/src/organisms/ModuleCard/hooks.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useCreateLiveCommandMutation } from '@opentrons/react-api-client' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ModuleCard/index.tsx b/app/src/organisms/ModuleCard/index.tsx index 3f8affd0b6f..d2d2dd1b838 100644 --- a/app/src/organisms/ModuleCard/index.tsx +++ b/app/src/organisms/ModuleCard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { Trans, useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' @@ -116,13 +116,13 @@ export const ModuleCard = (props: ModuleCardProps): JSX.Element | null => { setShowOverflowMenu(false) }, }) - const [showSlideout, setShowSlideout] = React.useState(false) - const [hasSecondary, setHasSecondary] = React.useState(false) - const [showAboutModule, setShowAboutModule] = React.useState(false) - const [showTestShake, setShowTestShake] = React.useState(false) - const [showHSWizard, setShowHSWizard] = React.useState(false) - const [showFWBanner, setShowFWBanner] = React.useState(true) - const [showCalModal, setShowCalModal] = React.useState(false) + const [showSlideout, setShowSlideout] = useState(false) + const [hasSecondary, setHasSecondary] = useState(false) + const [showAboutModule, setShowAboutModule] = useState(false) + const [showTestShake, setShowTestShake] = useState(false) + const [showHSWizard, setShowHSWizard] = useState(false) + const [showFWBanner, setShowFWBanner] = useState(true) + const [showCalModal, setShowCalModal] = useState(false) const [targetProps, tooltipProps] = useHoverTooltip() @@ -143,7 +143,7 @@ export const ModuleCard = (props: ModuleCardProps): JSX.Element | null => { const hasUpdated = !module.hasAvailableUpdate && latestRequest?.status === SUCCESS - const [showFirmwareToast, setShowFirmwareToast] = React.useState(hasUpdated) + const [showFirmwareToast, setShowFirmwareToast] = useState(hasUpdated) const { makeToast } = useToaster() if (showFirmwareToast) { makeToast(t('firmware_updated_successfully') as string, SUCCESS_TOAST) @@ -240,7 +240,7 @@ export const ModuleCard = (props: ModuleCardProps): JSX.Element | null => { const [ prepCommandErrorMessage, setPrepCommandErrorMessage, - ] = React.useState('') + ] = useState('') const handleCalibrateClick = (): void => { if (getModulePrepCommands(module).length > 0) { chainLiveCommands(getModulePrepCommands(module), false).catch( diff --git a/app/src/organisms/ModuleCard/utils.ts b/app/src/organisms/ModuleCard/utils.ts index 825a4bb6c6d..f581b379ca6 100644 --- a/app/src/organisms/ModuleCard/utils.ts +++ b/app/src/organisms/ModuleCard/utils.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useCallback } from 'react' import last from 'lodash/last' import { useDispatchApiRequest } from '/app/redux/robot-api' @@ -55,7 +55,7 @@ export function useModuleApiRequests(): [ const [ requestIdsBySerial, setRequestIdsBySerial, - ] = React.useState({}) + ] = useState({}) const handleModuleApiRequests = ( robotName: string, @@ -84,7 +84,7 @@ export function useModuleApiRequests(): [ } } - const getLatestRequestId = React.useCallback( + const getLatestRequestId = useCallback( (serialNumber: string): string | null => { if (serialNumber in requestIdsBySerial) { return last(requestIdsBySerial[serialNumber]) ?? null diff --git a/app/src/organisms/ModuleWizardFlows/AttachProbe.tsx b/app/src/organisms/ModuleWizardFlows/AttachProbe.tsx index 33717d93f88..fcd15766a54 100644 --- a/app/src/organisms/ModuleWizardFlows/AttachProbe.tsx +++ b/app/src/organisms/ModuleWizardFlows/AttachProbe.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { Trans, useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ModuleWizardFlows/BeforeBeginning.tsx b/app/src/organisms/ModuleWizardFlows/BeforeBeginning.tsx index edc65d0ebc0..440d8880af6 100644 --- a/app/src/organisms/ModuleWizardFlows/BeforeBeginning.tsx +++ b/app/src/organisms/ModuleWizardFlows/BeforeBeginning.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ModuleWizardFlows/DetachProbe.tsx b/app/src/organisms/ModuleWizardFlows/DetachProbe.tsx index fa82a3b507d..a580d1af861 100644 --- a/app/src/organisms/ModuleWizardFlows/DetachProbe.tsx +++ b/app/src/organisms/ModuleWizardFlows/DetachProbe.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import detachProbe1 from '/app/assets/videos/pipette-wizard-flows/Pipette_Detach_Probe_1.webm' import detachProbe8 from '/app/assets/videos/pipette-wizard-flows/Pipette_Detach_Probe_8.webm' diff --git a/app/src/organisms/ModuleWizardFlows/PlaceAdapter.tsx b/app/src/organisms/ModuleWizardFlows/PlaceAdapter.tsx index f10c1d29fdc..f0af5ae9cd4 100644 --- a/app/src/organisms/ModuleWizardFlows/PlaceAdapter.tsx +++ b/app/src/organisms/ModuleWizardFlows/PlaceAdapter.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { v4 as uuidv4 } from 'uuid' @@ -79,7 +79,7 @@ export const PlaceAdapter = (props: PlaceAdapterProps): JSX.Element | null => { createdMaintenanceRunId, } = props const { t } = useTranslation('module_wizard_flows') - React.useEffect(() => { + useEffect(() => { if (createdMaintenanceRunId == null) { createMaintenanceRun({}) } diff --git a/app/src/organisms/ModuleWizardFlows/SelectLocation.tsx b/app/src/organisms/ModuleWizardFlows/SelectLocation.tsx index 7e7efd10a8b..0f993bbfe99 100644 --- a/app/src/organisms/ModuleWizardFlows/SelectLocation.tsx +++ b/app/src/organisms/ModuleWizardFlows/SelectLocation.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import isEqual from 'lodash/isEqual' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/ModuleWizardFlows/Success.tsx b/app/src/organisms/ModuleWizardFlows/Success.tsx index 724ce984dbb..52a69bb06c0 100644 --- a/app/src/organisms/ModuleWizardFlows/Success.tsx +++ b/app/src/organisms/ModuleWizardFlows/Success.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { getModuleDisplayName } from '@opentrons/shared-data' diff --git a/app/src/organisms/Navigation/RestartRobotConfirmationModal.tsx b/app/src/organisms/Navigation/RestartRobotConfirmationModal.tsx index 2cb4d794438..eb903ff5919 100644 --- a/app/src/organisms/Navigation/RestartRobotConfirmationModal.tsx +++ b/app/src/organisms/Navigation/RestartRobotConfirmationModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' diff --git a/app/src/organisms/Navigation/__tests__/Navigation.test.tsx b/app/src/organisms/Navigation/__tests__/Navigation.test.tsx index 7090e1a9551..5a18c86f7dc 100644 --- a/app/src/organisms/Navigation/__tests__/Navigation.test.tsx +++ b/app/src/organisms/Navigation/__tests__/Navigation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/Navigation/__tests__/NavigationMenu.test.tsx b/app/src/organisms/Navigation/__tests__/NavigationMenu.test.tsx index 4912161b8f2..291c07c6c39 100644 --- a/app/src/organisms/Navigation/__tests__/NavigationMenu.test.tsx +++ b/app/src/organisms/Navigation/__tests__/NavigationMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/Navigation/__tests__/RestartRobotConfirmationModal.test.tsx b/app/src/organisms/Navigation/__tests__/RestartRobotConfirmationModal.test.tsx index 4f18362879e..8922a4225c2 100644 --- a/app/src/organisms/Navigation/__tests__/RestartRobotConfirmationModal.test.tsx +++ b/app/src/organisms/Navigation/__tests__/RestartRobotConfirmationModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NameRobot/ConfirmRobotName.tsx b/app/src/organisms/ODD/NameRobot/ConfirmRobotName.tsx index 526d2a77f3d..962a2d10de3 100644 --- a/app/src/organisms/ODD/NameRobot/ConfirmRobotName.tsx +++ b/app/src/organisms/ODD/NameRobot/ConfirmRobotName.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/ODD/NameRobot/__tests__/ConfirmRobotName.test.tsx b/app/src/organisms/ODD/NameRobot/__tests__/ConfirmRobotName.test.tsx index 195a0764f0e..d9e8521260e 100644 --- a/app/src/organisms/ODD/NameRobot/__tests__/ConfirmRobotName.test.tsx +++ b/app/src/organisms/ODD/NameRobot/__tests__/ConfirmRobotName.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/AlternativeSecurityTypeModal.tsx b/app/src/organisms/ODD/NetworkSettings/AlternativeSecurityTypeModal.tsx index d63d34f0667..856423f4125 100644 --- a/app/src/organisms/ODD/NetworkSettings/AlternativeSecurityTypeModal.tsx +++ b/app/src/organisms/ODD/NetworkSettings/AlternativeSecurityTypeModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/ODD/NetworkSettings/ConnectingNetwork.tsx b/app/src/organisms/ODD/NetworkSettings/ConnectingNetwork.tsx index 1fbb9811b6c..578abd4240d 100644 --- a/app/src/organisms/ODD/NetworkSettings/ConnectingNetwork.tsx +++ b/app/src/organisms/ODD/NetworkSettings/ConnectingNetwork.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/NetworkSettings/DisplaySearchNetwork.tsx b/app/src/organisms/ODD/NetworkSettings/DisplaySearchNetwork.tsx index 195c9d7799d..0dbe2cde650 100644 --- a/app/src/organisms/ODD/NetworkSettings/DisplaySearchNetwork.tsx +++ b/app/src/organisms/ODD/NetworkSettings/DisplaySearchNetwork.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/NetworkSettings/DisplayWifiList.tsx b/app/src/organisms/ODD/NetworkSettings/DisplayWifiList.tsx index 26ba8610229..fcfaa2931bf 100644 --- a/app/src/organisms/ODD/NetworkSettings/DisplayWifiList.tsx +++ b/app/src/organisms/ODD/NetworkSettings/DisplayWifiList.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { css } from 'styled-components' diff --git a/app/src/organisms/ODD/NetworkSettings/FailedToConnect.tsx b/app/src/organisms/ODD/NetworkSettings/FailedToConnect.tsx index d5a8f4cf331..e3859e4ed29 100644 --- a/app/src/organisms/ODD/NetworkSettings/FailedToConnect.tsx +++ b/app/src/organisms/ODD/NetworkSettings/FailedToConnect.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/NetworkSettings/SetWifiCred.tsx b/app/src/organisms/ODD/NetworkSettings/SetWifiCred.tsx index 52cc37bd2cf..c7fd6914717 100644 --- a/app/src/organisms/ODD/NetworkSettings/SetWifiCred.tsx +++ b/app/src/organisms/ODD/NetworkSettings/SetWifiCred.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, memo, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { @@ -31,16 +31,16 @@ export function SetWifiCred({ setPassword, }: SetWifiCredProps): JSX.Element { const { t } = useTranslation(['device_settings', 'shared']) - const keyboardRef = React.useRef(null) - const [showPassword, setShowPassword] = React.useState(false) - const inputRef = React.useRef(null) + const keyboardRef = useRef(null) + const [showPassword, setShowPassword] = useState(false) + const inputRef = useRef(null) const isUnboxingFlowOngoing = useIsUnboxingFlowOngoing() - const MemoizedInput = React.memo(InputField) + const MemoizedInput = memo(InputField) const handleBlur = (): void => { if (inputRef.current != null) inputRef.current?.focus() } - React.useEffect(() => { + useEffect(() => { if (inputRef.current != null) { inputRef.current.focus() } diff --git a/app/src/organisms/ODD/NetworkSettings/WifiConnectionDetails.tsx b/app/src/organisms/ODD/NetworkSettings/WifiConnectionDetails.tsx index e6fd446f129..2af3cbc2977 100644 --- a/app/src/organisms/ODD/NetworkSettings/WifiConnectionDetails.tsx +++ b/app/src/organisms/ODD/NetworkSettings/WifiConnectionDetails.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' @@ -53,9 +53,9 @@ export function WifiConnectionDetails({ const [ showNetworkDetailsModal, setShowNetworkDetailsModal, - ] = React.useState(false) + ] = useState(false) - React.useEffect(() => { + useEffect(() => { dispatch(fetchStatus(robotName)) // eslint-disable-next-line react-hooks/exhaustive-deps }, []) diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/AlternativeSecurityTypeModal.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/AlternativeSecurityTypeModal.test.tsx index 719ede15b7e..a01af9bba66 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/AlternativeSecurityTypeModal.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/AlternativeSecurityTypeModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/ConnectingNetwork.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/ConnectingNetwork.test.tsx index 293d6ad31cc..e040bee4572 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/ConnectingNetwork.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/ConnectingNetwork.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { screen } from '@testing-library/react' import { beforeEach, describe, expect, it } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/DisplaySearchNetwork.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/DisplaySearchNetwork.test.tsx index 67a04a01977..b26dba4cd68 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/DisplaySearchNetwork.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/DisplaySearchNetwork.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, expect, it } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/DisplayWifiList.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/DisplayWifiList.test.tsx index 756bc146ed6..e1449be3b9d 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/DisplayWifiList.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/DisplayWifiList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/FailedToConnect.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/FailedToConnect.test.tsx index 6bcd02a200e..3dbf7bf1f46 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/FailedToConnect.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/FailedToConnect.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/SelectAuthenticationType.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/SelectAuthenticationType.test.tsx index a5df5d7ba5e..4611d1be5f0 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/SelectAuthenticationType.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/SelectAuthenticationType.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' import { afterEach, beforeEach, describe, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiCred.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiCred.test.tsx index 4a89304f677..d1a25f069c9 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiCred.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiCred.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiSsid.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiSsid.test.tsx index ab3fa750168..11eab279c37 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiSsid.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/SetWifiSsid.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx b/app/src/organisms/ODD/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx index 0ac96705adc..efcee37e0c6 100644 --- a/app/src/organisms/ODD/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx +++ b/app/src/organisms/ODD/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/ProtocolDetails/ProtocolDetailsSkeleton.tsx b/app/src/organisms/ODD/ProtocolDetails/ProtocolDetailsSkeleton.tsx index e34e2d92b35..a7fbcc9accf 100644 --- a/app/src/organisms/ODD/ProtocolDetails/ProtocolDetailsSkeleton.tsx +++ b/app/src/organisms/ODD/ProtocolDetails/ProtocolDetailsSkeleton.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Flex, BORDERS, DIRECTION_COLUMN, SPACING } from '@opentrons/components' import { Skeleton } from '/app/atoms/Skeleton' diff --git a/app/src/organisms/ODD/ProtocolDetails/__tests__/ProtocolDetailsSkeleton.test.tsx b/app/src/organisms/ODD/ProtocolDetails/__tests__/ProtocolDetailsSkeleton.test.tsx index 04c377834ef..c56d09722fe 100644 --- a/app/src/organisms/ODD/ProtocolDetails/__tests__/ProtocolDetailsSkeleton.test.tsx +++ b/app/src/organisms/ODD/ProtocolDetails/__tests__/ProtocolDetailsSkeleton.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { render, screen } from '@testing-library/react' import { describe, expect, it } from 'vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupDeckConfiguration/__tests__/ProtocolSetupDeckConfiguration.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupDeckConfiguration/__tests__/ProtocolSetupDeckConfiguration.test.tsx index 11fdc6b417b..84a7fd2eb87 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupDeckConfiguration/__tests__/ProtocolSetupDeckConfiguration.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupDeckConfiguration/__tests__/ProtocolSetupDeckConfiguration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, afterEach } from 'vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/ProtocolSetupInstruments.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/ProtocolSetupInstruments.tsx index 4075b7ac006..a6377b248bc 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/ProtocolSetupInstruments.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/ProtocolSetupInstruments.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/__tests__/ProtocolSetupInstruments.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/__tests__/ProtocolSetupInstruments.test.tsx index fe4205e792d..3a1273130ee 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/__tests__/ProtocolSetupInstruments.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupInstruments/__tests__/ProtocolSetupInstruments.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/LabwareMapView.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/LabwareMapView.tsx index 31fc0431335..b22844cca13 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/LabwareMapView.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/LabwareMapView.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import map from 'lodash/map' import { BaseDeck, Flex } from '@opentrons/components' import { diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/SingleLabwareModal.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/SingleLabwareModal.tsx index 81ced71c592..36145dad085 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/SingleLabwareModal.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/SingleLabwareModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import styled from 'styled-components' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/LabwareMapView.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/LabwareMapView.test.tsx index d08914472e1..8729ae0f811 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/LabwareMapView.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/LabwareMapView.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { when } from 'vitest-when' import { describe, it, vi, beforeEach, afterEach, expect } from 'vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/ProtocolSetupLabware.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/ProtocolSetupLabware.test.tsx index a682401649e..08ec91b7e10 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/ProtocolSetupLabware.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/ProtocolSetupLabware.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/LiquidDetails.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/LiquidDetails.tsx index c613faafbc6..796e9595d85 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/LiquidDetails.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/LiquidDetails.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { @@ -70,9 +70,7 @@ interface LiquidDetailsProps { export function LiquidDetails(props: LiquidDetailsProps): JSX.Element { const { liquid, labwareByLiquidId, runId, commands } = props const { t } = useTranslation('protocol_setup') - const [labwareIdModal, setLabwareIdModal] = React.useState( - null - ) + const [labwareIdModal, setLabwareIdModal] = useState(null) return ( diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/LiquidDetails.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/LiquidDetails.test.tsx index 25585048be7..feeb3e863a4 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/LiquidDetails.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/LiquidDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import { describe, it, beforeEach, vi } from 'vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/ProtocolSetupLiquids.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/ProtocolSetupLiquids.test.tsx index 0dbf83a7c8d..487fbbd0bce 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/ProtocolSetupLiquids.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLiquids/__tests__/ProtocolSetupLiquids.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi } from 'vitest' import { screen, fireEvent } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/ModulesAndDeckMapView.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/ModulesAndDeckMapView.tsx index 614aefa88b2..48cab5f70cb 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/ModulesAndDeckMapView.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/ModulesAndDeckMapView.tsx @@ -1,5 +1,3 @@ -import React from 'react' - import { BaseDeck, Flex } from '@opentrons/components' import { FLEX_ROBOT_TYPE, diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/SetupInstructionsModal.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/SetupInstructionsModal.tsx index 4c701bc108e..d2fdc3bf540 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/SetupInstructionsModal.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/SetupInstructionsModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/FixtureTable.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/FixtureTable.test.tsx index 26e78092314..e6ca8735d77 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/FixtureTable.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/FixtureTable.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, afterEach, vi, expect } from 'vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ModulesAndDeckMapView.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ModulesAndDeckMapView.test.tsx index 28c6cf30995..d31a0312d02 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ModulesAndDeckMapView.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ModulesAndDeckMapView.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ProtocolSetupModulesAndDeck.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ProtocolSetupModulesAndDeck.test.tsx index 37598e92eb7..4cf2fb65a53 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ProtocolSetupModulesAndDeck.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/ProtocolSetupModulesAndDeck.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen, waitFor } from '@testing-library/react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/SetupInstructionsModal.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/SetupInstructionsModal.test.tsx index 28c0dd8222b..8f6f4c01739 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/SetupInstructionsModal.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupModulesAndDeck/__tests__/SetupInstructionsModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, beforeEach, vi } from 'vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupOffsets/index.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupOffsets/index.tsx index 6dbfb97c447..3f287ea80e6 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupOffsets/index.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupOffsets/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { Chip, diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailed.stories.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailed.stories.tsx index 92717171bb6..8967fc1f035 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailed.stories.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailed.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { VIEWPORT } from '../../../../../../components/src/ui-style-constants' import { AnalysisFailedModal } from './AnalysisFailedModal' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailedModal.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailedModal.tsx index 2d22198a58b..ac575e6fe4f 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailedModal.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/AnalysisFailedModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseCsvFile.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseCsvFile.tsx index eac9523b702..401731cf9f9 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseCsvFile.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseCsvFile.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect, Fragment } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { css } from 'styled-components' @@ -78,7 +78,7 @@ export function ChooseCsvFile({ const [ csvFileSelected, setCsvFileSelected, - ] = React.useState(initialFileObject) + ] = useState(initialFileObject) const handleBackButton = (): void => { if (!isEqual(csvFileSelected, initialFileObject)) { @@ -87,7 +87,7 @@ export function ChooseCsvFile({ handleGoBack() } - React.useEffect(() => { + useEffect(() => { if (csvFilesOnUSB.length === 0) { setCsvFileSelected({}) } @@ -119,7 +119,7 @@ export function ChooseCsvFile({ {csvFilesOnRobot.length !== 0 ? ( csvFilesOnRobot.map((csv: CsvFileData) => ( - + - + )) ) : ( @@ -150,7 +150,7 @@ export function ChooseCsvFile({ sortedCsvFilesOnUSB.map(csvFilePath => { const fileName = last(csvFilePath.split('/')) return ( - + {csvFilePath.length !== 0 && fileName !== undefined ? ( ) : null} - + ) }) ) : ( diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseEnum.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseEnum.tsx index a4723edf734..5b6ec5e5c5d 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseEnum.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseEnum.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseNumber.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseNumber.tsx index 179fbffb5df..934a1591844 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseNumber.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ChooseNumber.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { @@ -30,16 +30,14 @@ export function ChooseNumber({ const { makeSnackbar } = useToaster() const { i18n, t } = useTranslation(['protocol_setup', 'shared']) - const keyboardRef = React.useRef(null) - const [paramValue, setParamValue] = React.useState( - String(parameter.value) - ) + const keyboardRef = useRef(null) + const [paramValue, setParamValue] = useState(String(parameter.value)) // We need to arbitrarily set the value of the keyboard to a string the // same length as the initial parameter value (as string) when the component mounts // so that the delete button operates properly on the exisiting input field value. - const [prevKeyboardValue, setPrevKeyboardValue] = React.useState('') - React.useEffect(() => { + const [prevKeyboardValue, setPrevKeyboardValue] = useState('') + useEffect(() => { const arbitraryInput = new Array(paramValue).join('*') // @ts-expect-error keyboard should expose for `setInput` method keyboardRef.current?.setInput(arbitraryInput) diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.stories.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.stories.tsx index 45d0fa652fa..5932aca9031 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.stories.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex, SPACING, VIEWPORT } from '@opentrons/components' import { EmptyFile as EmptyFileComponent } from './EmptyFile' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.tsx index 888a0f0f91b..413042caad8 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/EmptyFile.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ProtocolSetupParameters.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ProtocolSetupParameters.tsx index 3264213f10d..bc7c3482d7d 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ProtocolSetupParameters.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ProtocolSetupParameters.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, Fragment } from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { @@ -62,23 +62,20 @@ export function ProtocolSetupParameters({ const [ chooseValueScreen, setChooseValueScreen, - ] = React.useState(null) + ] = useState(null) const [ showNumericalInputScreen, setShowNumericalInputScreen, - ] = React.useState(null) + ] = useState(null) const [ chooseCsvFileScreen, setChooseCsvFileScreen, - ] = React.useState(null) - const [resetValuesModal, showResetValuesModal] = React.useState( - false - ) - const [startSetup, setStartSetup] = React.useState(false) - const [ - runTimeParametersOverrides, - setRunTimeParametersOverrides, - ] = React.useState( + ] = useState(null) + const [resetValuesModal, showResetValuesModal] = useState(false) + const [startSetup, setStartSetup] = useState(false) + const [runTimeParametersOverrides, setRunTimeParametersOverrides] = useState< + RunTimeParameter[] + >( runTimeParameters.map(parameter => parameter.type === 'csv_file' ? { ...parameter, file: null } @@ -296,7 +293,7 @@ export function ProtocolSetupParameters({ setupStatus = 'inform' } return ( - + - + ) } )} diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.stories.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.stories.tsx index 975d8104a26..3becd83d063 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.stories.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { VIEWPORT } from '@opentrons/components' import { ResetValuesModal } from './ResetValuesModal' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.tsx index 4000052e933..ed3e70cd7df 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ResetValuesModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ViewOnlyParameters.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ViewOnlyParameters.tsx index d3ee60eb0a6..14956210cfb 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ViewOnlyParameters.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/ViewOnlyParameters.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/AnalysisFailedModal.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/AnalysisFailedModal.test.tsx index b64e1c34e54..ac43f26d621 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/AnalysisFailedModal.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/AnalysisFailedModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseCsvFile.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseCsvFile.test.tsx index 6440581840c..2f365fa5fbc 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseCsvFile.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseCsvFile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi, expect } from 'vitest' import { screen, fireEvent } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseEnum.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseEnum.test.tsx index 9e19d40a78b..a65c760d544 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseEnum.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseEnum.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe, beforeEach, vi, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseNumber.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseNumber.test.tsx index 6c7d29eeb49..611c0e124fc 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseNumber.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ChooseNumber.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe, beforeEach, vi, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/EmptyFile.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/EmptyFile.test.tsx index 0a48ea73f5a..386667d8430 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/EmptyFile.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/EmptyFile.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ProtocolSetupParameters.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ProtocolSetupParameters.test.tsx index 8561c694041..18a01391711 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ProtocolSetupParameters.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ProtocolSetupParameters.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { it, describe, beforeEach, vi, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ResetValuesModal.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ResetValuesModal.test.tsx index 244fa6808ed..4e263f9984b 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ResetValuesModal.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ResetValuesModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ViewOnlyParameters.test.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ViewOnlyParameters.test.tsx index 73eaa7bf1e3..aed74fea585 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ViewOnlyParameters.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupParameters/__tests__/ViewOnlyParameters.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { it, describe, beforeEach, vi, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupSkeleton.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupSkeleton.tsx index 4fc048a4422..55a996ef3f3 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupSkeleton.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupSkeleton.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { BORDERS } from '@opentrons/components' import { Skeleton } from '/app/atoms/Skeleton' diff --git a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupStep/index.tsx b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupStep/index.tsx index 5078d53b861..172aa5c7ebd 100644 --- a/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupStep/index.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/ProtocolSetupStep/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { Btn, diff --git a/app/src/organisms/ODD/ProtocolSetup/__tests__/ProtocolSetupSkeleton.test.tsx b/app/src/organisms/ODD/ProtocolSetup/__tests__/ProtocolSetupSkeleton.test.tsx index 53f5506c4a7..9fd0d8c3fa0 100644 --- a/app/src/organisms/ODD/ProtocolSetup/__tests__/ProtocolSetupSkeleton.test.tsx +++ b/app/src/organisms/ODD/ProtocolSetup/__tests__/ProtocolSetupSkeleton.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { render, screen } from '@testing-library/react' import { describe, expect, it } from 'vitest' diff --git a/app/src/organisms/ODD/RobotDashboard/EmptyRecentRun.tsx b/app/src/organisms/ODD/RobotDashboard/EmptyRecentRun.tsx index ddf462e570a..0dc551aff7a 100644 --- a/app/src/organisms/ODD/RobotDashboard/EmptyRecentRun.tsx +++ b/app/src/organisms/ODD/RobotDashboard/EmptyRecentRun.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCard.tsx b/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCard.tsx index 26d03fed45d..17ef7de2c3c 100644 --- a/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCard.tsx +++ b/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCard.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' @@ -90,7 +90,7 @@ export function ProtocolWithLastRun({ // TODO(BC, 08/29/23): reintroduce this analytics event when we refactor the hook to fetch data lazily (performance concern) // const { trackProtocolRunEvent } = useTrackProtocolRunEvent(runData.id) const { cloneRun } = useCloneRun(runData.id) - const [showSpinner, setShowSpinner] = React.useState(false) + const [showSpinner, setShowSpinner] = useState(false) const protocolName = protocolData.metadata.protocolName ?? protocolData.files[0].name diff --git a/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCarousel.tsx b/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCarousel.tsx index ac9006dc93d..037347146f0 100644 --- a/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCarousel.tsx +++ b/app/src/organisms/ODD/RobotDashboard/RecentRunProtocolCarousel.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_FLEX_START, DIRECTION_ROW, diff --git a/app/src/organisms/ODD/RobotDashboard/ServerInitializing.tsx b/app/src/organisms/ODD/RobotDashboard/ServerInitializing.tsx index fc363f22b02..a062628a3bc 100644 --- a/app/src/organisms/ODD/RobotDashboard/ServerInitializing.tsx +++ b/app/src/organisms/ODD/RobotDashboard/ServerInitializing.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/RobotDashboard/__tests__/EmptyRecentRun.test.tsx b/app/src/organisms/ODD/RobotDashboard/__tests__/EmptyRecentRun.test.tsx index 5cfd0b070b6..6c7c7e5371c 100644 --- a/app/src/organisms/ODD/RobotDashboard/__tests__/EmptyRecentRun.test.tsx +++ b/app/src/organisms/ODD/RobotDashboard/__tests__/EmptyRecentRun.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, expect, it } from 'vitest' diff --git a/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCard.test.tsx b/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCard.test.tsx index e3bdb0fd63c..e03f548f069 100644 --- a/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCard.test.tsx +++ b/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { formatDistance } from 'date-fns' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCarousel.test.tsx b/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCarousel.test.tsx index be90caa09e4..277edf80d87 100644 --- a/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCarousel.test.tsx +++ b/app/src/organisms/ODD/RobotDashboard/__tests__/RecentRunProtocolCarousel.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { beforeEach, describe, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/RobotDashboard/hooks/__tests__/useHardwareStatusText.test.tsx b/app/src/organisms/ODD/RobotDashboard/hooks/__tests__/useHardwareStatusText.test.tsx index 04388bda536..f209e69f5ec 100644 --- a/app/src/organisms/ODD/RobotDashboard/hooks/__tests__/useHardwareStatusText.test.tsx +++ b/app/src/organisms/ODD/RobotDashboard/hooks/__tests__/useHardwareStatusText.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { I18nextProvider } from 'react-i18next' import { renderHook } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/DeviceReset.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/DeviceReset.tsx index d7416bbe625..ab3349b62b7 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/DeviceReset.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/DeviceReset.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect, Fragment } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import styled from 'styled-components' @@ -57,7 +57,7 @@ export function DeviceReset({ setCurrentOption, }: DeviceResetProps): JSX.Element { const { t } = useTranslation('device_settings') - const [resetOptions, setResetOptions] = React.useState({}) + const [resetOptions, setResetOptions] = useState({}) const options = useSelector((state: State) => getResetConfigOptions(state, robotName) ) @@ -141,11 +141,11 @@ export function DeviceReset({ subText, } } - React.useEffect(() => { + useEffect(() => { dispatch(fetchResetConfigOptions(robotName)) }, [dispatch, robotName]) - React.useEffect(() => { + useEffect(() => { if ( isEveryOptionSelected(resetOptions) && (!resetOptions.authorizedKeys || @@ -161,7 +161,7 @@ export function DeviceReset({ } }, [resetOptions]) - React.useEffect(() => { + useEffect(() => { if ( !isEveryOptionSelected(resetOptions) && resetOptions.authorizedKeys && @@ -205,7 +205,7 @@ export function DeviceReset({ {availableOptionsToDisplay.map(option => { const { optionText, subText } = renderText(option.id) return ( - + - + ) })} diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/EthernetConnectionDetails.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/EthernetConnectionDetails.tsx index 34653237faa..ddf80031dc2 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/EthernetConnectionDetails.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/EthernetConnectionDetails.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { css } from 'styled-components' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/NetworkDetailsModal.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/NetworkDetailsModal.tsx index a6b6c5fa473..ef835573c8f 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/NetworkDetailsModal.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/NetworkDetailsModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSelectAuthenticationType.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSelectAuthenticationType.tsx index bb870f8fb77..0507cd5bec5 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSelectAuthenticationType.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSelectAuthenticationType.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, Flex } from '@opentrons/components' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSetWifiCred.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSetWifiCred.tsx index f86e4d977b1..0b06b66fb2b 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSetWifiCred.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsSetWifiCred.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, Flex } from '@opentrons/components' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifi.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifi.tsx index 081c9967b38..0c78423cca9 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifi.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifi.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, Flex } from '@opentrons/components' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifiConnect.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifiConnect.tsx index 70377aef3c8..3fc57e9028d 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifiConnect.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/RobotSettingsWifiConnect.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Flex, DIRECTION_COLUMN, SPACING } from '@opentrons/components' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/WifiConnectionDetails.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/WifiConnectionDetails.tsx index 0d94ec04d55..cc980592572 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/WifiConnectionDetails.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/WifiConnectionDetails.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -42,10 +42,9 @@ export function WifiConnectionDetails({ handleJoinAnotherNetwork, }: WifiConnectionDetailsProps): JSX.Element { const { i18n, t } = useTranslation(['device_settings', 'shared']) - const [ - showNetworkDetailModal, - setShowNetworkDetailModal, - ] = React.useState(false) + const [showNetworkDetailModal, setShowNetworkDetailModal] = useState( + false + ) const localRobot = useSelector(getLocalRobot) const robotName = localRobot?.name != null ? localRobot.name : 'no name' const list = useWifiList(robotName, FETCH_WIFI_LIST_MS) diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/EthernetConnectionDetails.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/EthernetConnectionDetails.test.tsx index e4d1a096ec7..ddefd80196d 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/EthernetConnectionDetails.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/EthernetConnectionDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkDetailsModal.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkDetailsModal.test.tsx index 21cd6fbc4c6..76b4c6f1be0 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkDetailsModal.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkDetailsModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkSettings.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkSettings.test.tsx index 5c1244ba66c..266778c0c81 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkSettings.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/NetworkSettings.test.tsx @@ -1,5 +1,5 @@ /* eslint-disable testing-library/no-node-access */ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx index b7d6aeafe18..9650a89b76c 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/__tests__/WifiConnectionDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/index.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/index.tsx index f3e6c1ea351..c9daabfc820 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/index.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/NetworkSettings/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/OnOffToggle.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/OnOffToggle.tsx index 565a8fb0798..32b3a94e474 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/OnOffToggle.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/OnOffToggle.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/Privacy.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/Privacy.tsx index 5954ae3850e..a07c12fe444 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/Privacy.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/Privacy.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/RobotName.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/RobotName.tsx index cb321fdaf95..3e640f2b4c0 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/RobotName.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/RobotName.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/RobotSettingButton.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/RobotSettingButton.tsx index da16402f0e2..f777c9fcb77 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/RobotSettingButton.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/RobotSettingButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersion.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersion.tsx index 0cb3087c1f1..d3c26eb3161 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersion.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersion.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { @@ -42,7 +42,7 @@ export function RobotSystemVersion({ 'app_settings', 'branded', ]) - const [showModal, setShowModal] = React.useState(isUpdateAvailable) + const [showModal, setShowModal] = useState(isUpdateAvailable) return ( <> diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersionModal.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersionModal.tsx index d08ea8b7328..9d09a2cf6b2 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersionModal.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/RobotSystemVersionModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/TextSize.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/TextSize.tsx index ad71888349f..56ca4f8c053 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/TextSize.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/TextSize.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/TouchscreenBrightness.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/TouchscreenBrightness.tsx index 2d2e7522fe5..830994c6924 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/TouchscreenBrightness.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/TouchscreenBrightness.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import styled from 'styled-components' @@ -54,7 +54,7 @@ export function TouchscreenBrightness({ const { t } = useTranslation(['device_settings']) const dispatch = useDispatch() const initialBrightness = useSelector(getOnDeviceDisplaySettings).brightness - const [brightness, setBrightness] = React.useState(initialBrightness) + const [brightness, setBrightness] = useState(initialBrightness) const brightnessLevel = [6, 5, 4, 3, 2, 1] const handleClick = (changeType: 'up' | 'down'): void => { diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/DeviceReset.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/DeviceReset.test.tsx index 8c04c6effa2..9f71205231e 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/DeviceReset.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/DeviceReset.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/Privacy.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/Privacy.test.tsx index 82b72d2707e..03f4a987462 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/Privacy.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/Privacy.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, describe, beforeEach, afterEach, expect, it } from 'vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersion.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersion.test.tsx index b5088e678c0..ad30e2539fa 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersion.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersion.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersionModal.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersionModal.test.tsx index 7ddfe109485..0d7a125eb1f 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersionModal.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/RobotSystemVersionModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TextSize.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TextSize.test.tsx index e58d805514c..703323c0d7e 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TextSize.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TextSize.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchScreenSleep.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchScreenSleep.test.tsx index c1cfde27b4e..990c6bcf436 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchScreenSleep.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchScreenSleep.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchscreenBrightness.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchscreenBrightness.test.tsx index 5795f7a1bba..76993c42300 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchscreenBrightness.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/TouchscreenBrightness.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/UpdateChannel.test.tsx b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/UpdateChannel.test.tsx index dd9b4c217be..c25e9582a4b 100644 --- a/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/UpdateChannel.test.tsx +++ b/app/src/organisms/ODD/RobotSettingsDashboard/__tests__/UpdateChannel.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/ODD/RunningProtocol/CancelingRunModal.tsx b/app/src/organisms/ODD/RunningProtocol/CancelingRunModal.tsx index ff5f096fa64..1aa7c2c306e 100644 --- a/app/src/organisms/ODD/RunningProtocol/CancelingRunModal.tsx +++ b/app/src/organisms/ODD/RunningProtocol/CancelingRunModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ODD/RunningProtocol/ConfirmCancelRunModal.tsx b/app/src/organisms/ODD/RunningProtocol/ConfirmCancelRunModal.tsx index c0036d03953..453e3152ad4 100644 --- a/app/src/organisms/ODD/RunningProtocol/ConfirmCancelRunModal.tsx +++ b/app/src/organisms/ODD/RunningProtocol/ConfirmCancelRunModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { useSelector } from 'react-redux' @@ -66,7 +66,7 @@ export function ConfirmCancelRunModal({ const robotName = localRobot?.name ?? '' const { trackProtocolRunEvent } = useTrackProtocolRunEvent(runId, robotName) const navigate = useNavigate() - const [isCanceling, setIsCanceling] = React.useState(false) + const [isCanceling, setIsCanceling] = useState(false) const modalHeader: OddModalHeaderBaseProps = { title: t('cancel_run_modal_heading'), @@ -84,7 +84,7 @@ export function ConfirmCancelRunModal({ }) } - React.useEffect(() => { + useEffect(() => { if (runStatus === RUN_STATUS_STOPPED) { trackProtocolRunEvent({ name: ANALYTICS_PROTOCOL_RUN_ACTION.CANCEL }) if (!isActiveRun) { diff --git a/app/src/organisms/ODD/RunningProtocol/CurrentRunningProtocolCommand.tsx b/app/src/organisms/ODD/RunningProtocol/CurrentRunningProtocolCommand.tsx index 2118896891e..e474d58ab11 100644 --- a/app/src/organisms/ODD/RunningProtocol/CurrentRunningProtocolCommand.tsx +++ b/app/src/organisms/ODD/RunningProtocol/CurrentRunningProtocolCommand.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css, keyframes } from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/ODD/RunningProtocol/PlayPauseButton.tsx b/app/src/organisms/ODD/RunningProtocol/PlayPauseButton.tsx index 47428f1420b..44b4154cf65 100644 --- a/app/src/organisms/ODD/RunningProtocol/PlayPauseButton.tsx +++ b/app/src/organisms/ODD/RunningProtocol/PlayPauseButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/organisms/ODD/RunningProtocol/RunFailedModal.tsx b/app/src/organisms/ODD/RunningProtocol/RunFailedModal.tsx index 1de8c5138d7..78d5e06d2d2 100644 --- a/app/src/organisms/ODD/RunningProtocol/RunFailedModal.tsx +++ b/app/src/organisms/ODD/RunningProtocol/RunFailedModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { css } from 'styled-components' @@ -46,7 +46,7 @@ export function RunFailedModal({ const { t, i18n } = useTranslation(['run_details', 'shared', 'branded']) const navigate = useNavigate() const { stopRun } = useStopRunMutation() - const [isCanceling, setIsCanceling] = React.useState(false) + const [isCanceling, setIsCanceling] = useState(false) if ( (errors == null || errors.length === 0) && diff --git a/app/src/organisms/ODD/RunningProtocol/RunningProtocolCommandList.tsx b/app/src/organisms/ODD/RunningProtocol/RunningProtocolCommandList.tsx index f351a46541f..f161fa77e05 100644 --- a/app/src/organisms/ODD/RunningProtocol/RunningProtocolCommandList.tsx +++ b/app/src/organisms/ODD/RunningProtocol/RunningProtocolCommandList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { ViewportList } from 'react-viewport-list' @@ -102,14 +102,14 @@ export function RunningProtocolCommandList({ currentRunCommandIndex, }: RunningProtocolCommandListProps): JSX.Element { const { t } = useTranslation('run_details') - const viewPortRef = React.useRef(null) - const ref = React.useRef(null) + const viewPortRef = useRef(null) + const ref = useRef(null) const currentRunStatus = t(`status_${runStatus}`) const onStop = (): void => { if (runStatus === RUN_STATUS_RUNNING) pauseRun() setShowConfirmCancelRunModal(true) } - const [visibleRange, setVisibleRange] = React.useState({ + const [visibleRange, setVisibleRange] = useState({ lowestVisibleIndex: 0, highestVisibleIndex: 0, }) @@ -133,7 +133,7 @@ export function RunningProtocolCommandList({ } } - React.useEffect(() => { + useEffect(() => { // Note (kk:09/25/2023) Need -1 because the element of highestVisibleIndex cannot really readable // due to limited space const isCurrentCommandVisible = diff --git a/app/src/organisms/ODD/RunningProtocol/RunningProtocolSkeleton.tsx b/app/src/organisms/ODD/RunningProtocol/RunningProtocolSkeleton.tsx index 073f650530a..d6bcc91ea21 100644 --- a/app/src/organisms/ODD/RunningProtocol/RunningProtocolSkeleton.tsx +++ b/app/src/organisms/ODD/RunningProtocol/RunningProtocolSkeleton.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { DIRECTION_COLUMN, DIRECTION_ROW, diff --git a/app/src/organisms/ODD/RunningProtocol/StopButton.tsx b/app/src/organisms/ODD/RunningProtocol/StopButton.tsx index 2711c8b9da2..4ee9a716c81 100644 --- a/app/src/organisms/ODD/RunningProtocol/StopButton.tsx +++ b/app/src/organisms/ODD/RunningProtocol/StopButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/organisms/ODD/RunningProtocol/__tests__/CancelingRunModal.test.tsx b/app/src/organisms/ODD/RunningProtocol/__tests__/CancelingRunModal.test.tsx index 334493b8db9..5bc8efafe42 100644 --- a/app/src/organisms/ODD/RunningProtocol/__tests__/CancelingRunModal.test.tsx +++ b/app/src/organisms/ODD/RunningProtocol/__tests__/CancelingRunModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it } from 'vitest' diff --git a/app/src/organisms/ODD/RunningProtocol/__tests__/ConfirmCancelRunModal.test.tsx b/app/src/organisms/ODD/RunningProtocol/__tests__/ConfirmCancelRunModal.test.tsx index 55c4b3fec65..69f610d3ef8 100644 --- a/app/src/organisms/ODD/RunningProtocol/__tests__/ConfirmCancelRunModal.test.tsx +++ b/app/src/organisms/ODD/RunningProtocol/__tests__/ConfirmCancelRunModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/ODD/RunningProtocol/__tests__/CurrentRunningProtocolCommand.test.tsx b/app/src/organisms/ODD/RunningProtocol/__tests__/CurrentRunningProtocolCommand.test.tsx index 7cde75fdbaf..8e19bb69491 100644 --- a/app/src/organisms/ODD/RunningProtocol/__tests__/CurrentRunningProtocolCommand.test.tsx +++ b/app/src/organisms/ODD/RunningProtocol/__tests__/CurrentRunningProtocolCommand.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/RunningProtocol/__tests__/RunFailedModal.test.tsx b/app/src/organisms/ODD/RunningProtocol/__tests__/RunFailedModal.test.tsx index 09f86423fcf..8dcfd2e5b88 100644 --- a/app/src/organisms/ODD/RunningProtocol/__tests__/RunFailedModal.test.tsx +++ b/app/src/organisms/ODD/RunningProtocol/__tests__/RunFailedModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolCommandList.test.tsx b/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolCommandList.test.tsx index 3504d069ee5..f506dce8404 100644 --- a/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolCommandList.test.tsx +++ b/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolCommandList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' diff --git a/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolSkeleton.test.tsx b/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolSkeleton.test.tsx index 33bc166f181..656d4d250d1 100644 --- a/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolSkeleton.test.tsx +++ b/app/src/organisms/ODD/RunningProtocol/__tests__/RunningProtocolSkeleton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { beforeEach, describe, expect, it } from 'vitest' diff --git a/app/src/organisms/ODD/hooks/__tests__/useIsUnboxingFlowOngoing.test.tsx b/app/src/organisms/ODD/hooks/__tests__/useIsUnboxingFlowOngoing.test.tsx index 4f4bec2ccbe..d7610096015 100644 --- a/app/src/organisms/ODD/hooks/__tests__/useIsUnboxingFlowOngoing.test.tsx +++ b/app/src/organisms/ODD/hooks/__tests__/useIsUnboxingFlowOngoing.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { renderHook } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { Provider } from 'react-redux' diff --git a/app/src/organisms/OpenDoorAlertModal/__tests__/OpenDoorAlertModal.test.tsx b/app/src/organisms/OpenDoorAlertModal/__tests__/OpenDoorAlertModal.test.tsx index 9bd39379845..a431ecac1cb 100644 --- a/app/src/organisms/OpenDoorAlertModal/__tests__/OpenDoorAlertModal.test.tsx +++ b/app/src/organisms/OpenDoorAlertModal/__tests__/OpenDoorAlertModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it } from 'vitest' diff --git a/app/src/organisms/OpenDoorAlertModal/index.tsx b/app/src/organisms/OpenDoorAlertModal/index.tsx index b12435d9c99..f9ac5440823 100644 --- a/app/src/organisms/OpenDoorAlertModal/index.tsx +++ b/app/src/organisms/OpenDoorAlertModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/PipetteWizardFlows/AttachProbe.tsx b/app/src/organisms/PipetteWizardFlows/AttachProbe.tsx index dcb3c323770..66f40287463 100644 --- a/app/src/organisms/PipetteWizardFlows/AttachProbe.tsx +++ b/app/src/organisms/PipetteWizardFlows/AttachProbe.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { css } from 'styled-components' import { Trans, useTranslation } from 'react-i18next' import { @@ -58,9 +58,7 @@ export const AttachProbe = (props: AttachProbeProps): JSX.Element | null => { } = props const { t, i18n } = useTranslation('pipette_wizard_flows') const pipetteWizardStep = { mount, flowType, section: SECTIONS.ATTACH_PROBE } - const [showUnableToDetect, setShowUnableToDetect] = React.useState( - false - ) + const [showUnableToDetect, setShowUnableToDetect] = useState(false) const pipetteId = attachedPipettes[mount]?.serialNumber const displayName = attachedPipettes[mount]?.displayName diff --git a/app/src/organisms/PipetteWizardFlows/BeforeBeginning.tsx b/app/src/organisms/PipetteWizardFlows/BeforeBeginning.tsx index 99df19fbecf..ffcb72dae18 100644 --- a/app/src/organisms/PipetteWizardFlows/BeforeBeginning.tsx +++ b/app/src/organisms/PipetteWizardFlows/BeforeBeginning.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { Trans, useTranslation } from 'react-i18next' import { COLORS, @@ -79,7 +79,7 @@ export const BeforeBeginning = ( createdMaintenanceRunId, } = props const { t } = useTranslation(['pipette_wizard_flows', 'shared']) - React.useEffect(() => { + useEffect(() => { if (createdMaintenanceRunId == null) { createMaintenanceRun({}) } diff --git a/app/src/organisms/PipetteWizardFlows/Carriage.tsx b/app/src/organisms/PipetteWizardFlows/Carriage.tsx index cdd75df4ffe..f4103cf424d 100644 --- a/app/src/organisms/PipetteWizardFlows/Carriage.tsx +++ b/app/src/organisms/PipetteWizardFlows/Carriage.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import capitalize from 'lodash/capitalize' import { diff --git a/app/src/organisms/PipetteWizardFlows/CheckPipetteButton.tsx b/app/src/organisms/PipetteWizardFlows/CheckPipetteButton.tsx index 83c5b1507fd..2300204b65b 100644 --- a/app/src/organisms/PipetteWizardFlows/CheckPipetteButton.tsx +++ b/app/src/organisms/PipetteWizardFlows/CheckPipetteButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useInstrumentsQuery } from '@opentrons/react-api-client' import { PrimaryButton } from '@opentrons/components' import { SmallButton } from '/app/atoms/buttons' diff --git a/app/src/organisms/PipetteWizardFlows/DetachProbe.tsx b/app/src/organisms/PipetteWizardFlows/DetachProbe.tsx index 03603bd640c..833f28d45dc 100644 --- a/app/src/organisms/PipetteWizardFlows/DetachProbe.tsx +++ b/app/src/organisms/PipetteWizardFlows/DetachProbe.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { LegacyStyledText } from '@opentrons/components' import { GenericWizardTile } from '/app/molecules/GenericWizardTile' diff --git a/app/src/organisms/PipetteWizardFlows/ExitModal.tsx b/app/src/organisms/PipetteWizardFlows/ExitModal.tsx index 90430769d8f..d2bc3517643 100644 --- a/app/src/organisms/PipetteWizardFlows/ExitModal.tsx +++ b/app/src/organisms/PipetteWizardFlows/ExitModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import capitalize from 'lodash/capitalize' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/PipetteWizardFlows/MountPipette.tsx b/app/src/organisms/PipetteWizardFlows/MountPipette.tsx index 47caab54ff2..9ba1b036785 100644 --- a/app/src/organisms/PipetteWizardFlows/MountPipette.tsx +++ b/app/src/organisms/PipetteWizardFlows/MountPipette.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { SINGLE_MOUNT_PIPETTES, diff --git a/app/src/organisms/PipetteWizardFlows/MountingPlate.tsx b/app/src/organisms/PipetteWizardFlows/MountingPlate.tsx index a09ee3d2c1b..aaa6178fc79 100644 --- a/app/src/organisms/PipetteWizardFlows/MountingPlate.tsx +++ b/app/src/organisms/PipetteWizardFlows/MountingPlate.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { LEFT } from '@opentrons/shared-data' import { COLORS, SPACING, LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/PipetteWizardFlows/ProbeNotAttached.tsx b/app/src/organisms/PipetteWizardFlows/ProbeNotAttached.tsx index d959065ac49..d98fde280f7 100644 --- a/app/src/organisms/PipetteWizardFlows/ProbeNotAttached.tsx +++ b/app/src/organisms/PipetteWizardFlows/ProbeNotAttached.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, @@ -32,7 +32,7 @@ export const ProbeNotAttached = ( 'branded', ]) const { isOnDevice, handleOnClick, setShowUnableToDetect } = props - const [numberOfTryAgains, setNumberOfTryAgains] = React.useState(0) + const [numberOfTryAgains, setNumberOfTryAgains] = useState(0) return ( props.pipetteInfo ?? null, []) - const isGantryEmpty = React.useMemo( + const memoizedPipetteInfo = useMemo(() => props.pipetteInfo ?? null, []) + const isGantryEmpty = useMemo( () => attachedPipettes[LEFT] == null && attachedPipettes[RIGHT] == null, [] ) - const pipetteWizardSteps = React.useMemo( + const pipetteWizardSteps = useMemo( () => memoizedPipetteInfo == null ? getPipetteWizardSteps(flowType, mount, selectedPipette, isGantryEmpty) @@ -91,14 +91,12 @@ export const PipetteWizardFlows = ( pipette => pipette.mount === mount ) const host = useHost() - const [currentStepIndex, setCurrentStepIndex] = React.useState(0) + const [currentStepIndex, setCurrentStepIndex] = useState(0) const totalStepCount = pipetteWizardSteps != null ? pipetteWizardSteps.length - 1 : 0 const currentStep = pipetteWizardSteps?.[currentStepIndex] ?? null - const [isFetchingPipettes, setIsFetchingPipettes] = React.useState( - false - ) - const memoizedAttachedPipettes = React.useMemo(() => attachedPipettes, []) + const [isFetchingPipettes, setIsFetchingPipettes] = useState(false) + const memoizedAttachedPipettes = useMemo(() => attachedPipettes, []) const hasCalData = memoizedAttachedPipettes[mount]?.data.calibratedOffset?.last_modified != null @@ -111,8 +109,8 @@ export const PipetteWizardFlows = ( attachedPipettes: memoizedAttachedPipettes, pipetteInfo: memoizedPipetteInfo, }) - const memoizedWizardTitle = React.useMemo(() => wizardTitle, []) - const [createdMaintenanceRunId, setCreatedMaintenanceRunId] = React.useState< + const memoizedWizardTitle = useMemo(() => wizardTitle, []) + const [createdMaintenanceRunId, setCreatedMaintenanceRunId] = useState< string | null >(null) // we should start checking for run deletion only after the maintenance run is created @@ -120,7 +118,7 @@ export const PipetteWizardFlows = ( const [ monitorMaintenanceRunForDeletion, setMonitorMaintenanceRunForDeletion, - ] = React.useState(false) + ] = useState(false) const goBack = (): void => { setCurrentStepIndex( @@ -151,7 +149,7 @@ export const PipetteWizardFlows = ( // this will close the modal in case the run was deleted by the terminate // activity modal on the ODD - React.useEffect(() => { + useEffect(() => { if ( createdMaintenanceRunId !== null && maintenanceRunData?.data.id === createdMaintenanceRunId @@ -171,10 +169,8 @@ export const PipetteWizardFlows = ( closeFlow, ]) - const [errorMessage, setShowErrorMessage] = React.useState( - null - ) - const [isExiting, setIsExiting] = React.useState(false) + const [errorMessage, setShowErrorMessage] = useState(null) + const [isExiting, setIsExiting] = useState(false) const proceed = (): void => { if (!isCommandMutationLoading) { setCurrentStepIndex( diff --git a/app/src/organisms/PipetteWizardFlows/utils.tsx b/app/src/organisms/PipetteWizardFlows/utils.tsx index 1eb2ad83632..c4be3be880d 100644 --- a/app/src/organisms/PipetteWizardFlows/utils.tsx +++ b/app/src/organisms/PipetteWizardFlows/utils.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { LEFT, RIGHT } from '@opentrons/shared-data' import { SPACING } from '@opentrons/components' diff --git a/app/src/organisms/ProtocolAnalysisFailure/ProtocolAnalysisStale.tsx b/app/src/organisms/ProtocolAnalysisFailure/ProtocolAnalysisStale.tsx index 2cbd85417f2..9b3a7c00d14 100644 --- a/app/src/organisms/ProtocolAnalysisFailure/ProtocolAnalysisStale.tsx +++ b/app/src/organisms/ProtocolAnalysisFailure/ProtocolAnalysisStale.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation, Trans } from 'react-i18next' diff --git a/app/src/organisms/ProtocolAnalysisFailure/__tests__/ProtocolAnalysisFailure.test.tsx b/app/src/organisms/ProtocolAnalysisFailure/__tests__/ProtocolAnalysisFailure.test.tsx index ff8d5fa225d..fbdec0a45ec 100644 --- a/app/src/organisms/ProtocolAnalysisFailure/__tests__/ProtocolAnalysisFailure.test.tsx +++ b/app/src/organisms/ProtocolAnalysisFailure/__tests__/ProtocolAnalysisFailure.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' diff --git a/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx b/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx index 4e15ad14b62..bdc5848f03b 100644 --- a/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx +++ b/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' import { diff --git a/app/src/organisms/ProtocolDetails/ProtocolLiquidsDetails.tsx b/app/src/organisms/ProtocolDetails/ProtocolLiquidsDetails.tsx index 0cb9780dee7..2c255666fcd 100644 --- a/app/src/organisms/ProtocolDetails/ProtocolLiquidsDetails.tsx +++ b/app/src/organisms/ProtocolDetails/ProtocolLiquidsDetails.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' @@ -50,7 +50,7 @@ export const ProtocolLiquidsDetails = ( {liquidsInLoadOrder.length > 0 ? ( liquidsInLoadOrder?.map((liquid, index) => { return ( - + {index < liquidsInLoadOrder.length - 1 && } - + ) }) ) : ( diff --git a/app/src/organisms/ProtocolDetails/ProtocolParameters/__tests__/ProtocolParameters.test.tsx b/app/src/organisms/ProtocolDetails/ProtocolParameters/__tests__/ProtocolParameters.test.tsx index e87c660e0d9..e52803cc054 100644 --- a/app/src/organisms/ProtocolDetails/ProtocolParameters/__tests__/ProtocolParameters.test.tsx +++ b/app/src/organisms/ProtocolDetails/ProtocolParameters/__tests__/ProtocolParameters.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ProtocolDetails/ProtocolParameters/index.tsx b/app/src/organisms/ProtocolDetails/ProtocolParameters/index.tsx index 6b7d6ce7a60..23ee98c1649 100644 --- a/app/src/organisms/ProtocolDetails/ProtocolParameters/index.tsx +++ b/app/src/organisms/ProtocolDetails/ProtocolParameters/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ProtocolDetails/ProtocolStats.tsx b/app/src/organisms/ProtocolDetails/ProtocolStats.tsx index 935636690c7..589eeb2e2ea 100644 --- a/app/src/organisms/ProtocolDetails/ProtocolStats.tsx +++ b/app/src/organisms/ProtocolDetails/ProtocolStats.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx b/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx index d2fc14e63eb..5789a8af6e6 100644 --- a/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx +++ b/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/ProtocolDetails/__tests__/ProtocolDetails.test.tsx b/app/src/organisms/ProtocolDetails/__tests__/ProtocolDetails.test.tsx index faf7cd40053..e1884919d55 100644 --- a/app/src/organisms/ProtocolDetails/__tests__/ProtocolDetails.test.tsx +++ b/app/src/organisms/ProtocolDetails/__tests__/ProtocolDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { act, screen, waitFor } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' import { describe, it, beforeEach, vi, expect, afterEach } from 'vitest' diff --git a/app/src/organisms/ProtocolDetails/__tests__/ProtocolLabwareDetails.test.tsx b/app/src/organisms/ProtocolDetails/__tests__/ProtocolLabwareDetails.test.tsx index 3d22f3d813e..93c215643cf 100644 --- a/app/src/organisms/ProtocolDetails/__tests__/ProtocolLabwareDetails.test.tsx +++ b/app/src/organisms/ProtocolDetails/__tests__/ProtocolLabwareDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/ProtocolDetails/__tests__/ProtocolLiquidsDetails.test.tsx b/app/src/organisms/ProtocolDetails/__tests__/ProtocolLiquidsDetails.test.tsx index eeb761277b1..f21ea09c406 100644 --- a/app/src/organisms/ProtocolDetails/__tests__/ProtocolLiquidsDetails.test.tsx +++ b/app/src/organisms/ProtocolDetails/__tests__/ProtocolLiquidsDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi } from 'vitest' import { parseLiquidsInLoadOrder } from '@opentrons/shared-data' diff --git a/app/src/organisms/ProtocolDetails/__tests__/RobotConfigurationDetails.test.tsx b/app/src/organisms/ProtocolDetails/__tests__/RobotConfigurationDetails.test.tsx index e7f473c837d..b823732ce95 100644 --- a/app/src/organisms/ProtocolDetails/__tests__/RobotConfigurationDetails.test.tsx +++ b/app/src/organisms/ProtocolDetails/__tests__/RobotConfigurationDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, afterEach, vi } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/ProtocolDetails/index.tsx b/app/src/organisms/ProtocolDetails/index.tsx index 5df7bd33e4a..213c20d3074 100644 --- a/app/src/organisms/ProtocolDetails/index.tsx +++ b/app/src/organisms/ProtocolDetails/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, Fragment } from 'react' import { createPortal } from 'react-dom' import map from 'lodash/map' import omit from 'lodash/omit' @@ -142,7 +142,7 @@ function MetadataDetails({ {filteredMetaData.map((item, index) => { return ( - + {item.value} - + ) })} @@ -167,7 +167,7 @@ interface ReadMoreContentProps { const ReadMoreContent = (props: ReadMoreContentProps): JSX.Element => { const { metadata, protocolType } = props const { t, i18n } = useTranslation('protocol_details') - const [isReadMore, setIsReadMore] = React.useState(true) + const [isReadMore, setIsReadMore] = useState(true) const description = isEmpty(metadata.description) ? t('shared:no_data') @@ -217,18 +217,18 @@ export function ProtocolDetails( const enableProtocolTimeline = useFeatureFlag('protocolTimeline') const runTimeParameters = mostRecentAnalysis?.runTimeParameters ?? [] const hasRunTimeParameters = runTimeParameters.length > 0 - const [currentTab, setCurrentTab] = React.useState< + const [currentTab, setCurrentTab] = useState< 'robot_config' | 'labware' | 'liquids' | 'stats' | 'parameters' | 'timeline' >(hasRunTimeParameters ? 'parameters' : 'robot_config') const [ showChooseRobotToRunProtocolSlideout, setShowChooseRobotToRunProtocolSlideout, - ] = React.useState(false) + ] = useState(false) const [ showSendProtocolToFlexSlideout, setShowSendProtocolToFlexSlideout, - ] = React.useState(false) - const [showDeckViewModal, setShowDeckViewModal] = React.useState(false) + ] = useState(false) + const [showDeckViewModal, setShowDeckViewModal] = useState(false) const isAnalyzing = useSelector((state: State) => getIsProtocolAnalysisInProgress(state, protocolKey) diff --git a/app/src/organisms/ProtocolStatusBanner/__tests__/ProtocolStatusBanner.test.tsx b/app/src/organisms/ProtocolStatusBanner/__tests__/ProtocolStatusBanner.test.tsx index a7de3ba7ef1..3a0326c5273 100644 --- a/app/src/organisms/ProtocolStatusBanner/__tests__/ProtocolStatusBanner.test.tsx +++ b/app/src/organisms/ProtocolStatusBanner/__tests__/ProtocolStatusBanner.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect } from 'vitest' diff --git a/app/src/organisms/ProtocolStatusBanner/index.tsx b/app/src/organisms/ProtocolStatusBanner/index.tsx index f7259f97d03..133cbf35896 100644 --- a/app/src/organisms/ProtocolStatusBanner/index.tsx +++ b/app/src/organisms/ProtocolStatusBanner/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { SPACING, Banner, LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx b/app/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx index fee6d977cf7..ae9377a19a0 100644 --- a/app/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx +++ b/app/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { Flex, DIRECTION_COLUMN, @@ -28,7 +28,7 @@ interface CommandItemProps { robotType: RobotType } export function CommandItem(props: CommandItemProps): JSX.Element { - const [showDetails, setShowDetails] = React.useState(false) + const [showDetails, setShowDetails] = useState(false) const { index, command, diff --git a/app/src/organisms/ProtocolTimelineScrubber/PipetteVisuals.tsx b/app/src/organisms/ProtocolTimelineScrubber/PipetteVisuals.tsx index 6a9ee8dc566..10224a08e49 100644 --- a/app/src/organisms/ProtocolTimelineScrubber/PipetteVisuals.tsx +++ b/app/src/organisms/ProtocolTimelineScrubber/PipetteVisuals.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { Flex, Box, @@ -32,7 +32,7 @@ export function PipetteMountViz( props: PipetteMountVizProps ): JSX.Element | null { const { mount, pipetteEntity, pipetteId, timelineFrame, analysis } = props - const [showPipetteDetails, setShowPipetteDetails] = React.useState(false) + const [showPipetteDetails, setShowPipetteDetails] = useState(false) return pipetteEntity == null ? null : ( (false) + const [name, setName] = useState('') + const keyboardRef = useRef(null) + const [isSaving, setIsSaving] = useState(false) let error: string | null = null if (name.length > 60) { diff --git a/app/src/organisms/QuickTransferFlow/Overview.tsx b/app/src/organisms/QuickTransferFlow/Overview.tsx index 9b83ecc174f..26c5cb60384 100644 --- a/app/src/organisms/QuickTransferFlow/Overview.tsx +++ b/app/src/organisms/QuickTransferFlow/Overview.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { COLORS, diff --git a/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx b/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx index ab56f758fe3..c9e57469ac0 100644 --- a/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx +++ b/app/src/organisms/QuickTransferFlow/SaveOrRunModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { SPACING, @@ -19,8 +19,8 @@ interface SaveOrRunModalProps { export const SaveOrRunModal = (props: SaveOrRunModalProps): JSX.Element => { const { t } = useTranslation('quick_transfer') - const [showNameTransfer, setShowNameTransfer] = React.useState(false) - const [isLoading, setIsLoading] = React.useState(false) + const [showNameTransfer, setShowNameTransfer] = useState(false) + const [isLoading, setIsLoading] = useState(false) return showNameTransfer ? ( diff --git a/app/src/organisms/QuickTransferFlow/__tests__/ConfirmExitModal.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/ConfirmExitModal.test.tsx index a35a2b3eb5f..4b50c31ca29 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/ConfirmExitModal.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/ConfirmExitModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/CreateNewTransfer.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/CreateNewTransfer.test.tsx index 0b72abd3627..178086ae401 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/CreateNewTransfer.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/CreateNewTransfer.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' import { DeckConfigurator } from '@opentrons/components' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/NameQuickTransfer.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/NameQuickTransfer.test.tsx index a12ff557061..363c89cdc82 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/NameQuickTransfer.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/NameQuickTransfer.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/Overview.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/Overview.test.tsx index a60804414f4..242b0f58a92 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/Overview.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/Overview.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/AirGap.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/AirGap.test.tsx index 7910a9622e1..b3e7ef55e31 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/AirGap.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/AirGap.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/BlowOut.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/BlowOut.test.tsx index 730a9620126..48d32beeb31 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/BlowOut.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/BlowOut.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Delay.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Delay.test.tsx index 43697ba5c2e..58f1876adab 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Delay.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Delay.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/FlowRate.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/FlowRate.test.tsx index 0c595c02d25..fc8b6960e1d 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/FlowRate.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/FlowRate.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Mix.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Mix.test.tsx index f49fa987586..6f66cc911d6 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Mix.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/Mix.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/PipettePath.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/PipettePath.test.tsx index c5beb993239..985fc73cba3 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/PipettePath.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/PipettePath.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/QuickTransferAdvancedSettings.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/QuickTransferAdvancedSettings.test.tsx index 18e4ed52779..16e9012b0fc 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/QuickTransferAdvancedSettings.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/QuickTransferAdvancedSettings.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TipPosition.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TipPosition.test.tsx index 63caab2deaf..cdc4b94a735 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TipPosition.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TipPosition.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TouchTip.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TouchTip.test.tsx index da74536d10a..3996d79a780 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TouchTip.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TouchTip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/SelectDestLabware.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/SelectDestLabware.test.tsx index 848921eb76e..6448542c14e 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/SelectDestLabware.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/SelectDestLabware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/SelectPipette.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/SelectPipette.test.tsx index 463b2b7bb61..e32f7645593 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/SelectPipette.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/SelectPipette.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' import { useInstrumentsQuery } from '@opentrons/react-api-client' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/SelectSourceLabware.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/SelectSourceLabware.test.tsx index 1f353557e1c..73121ea7b2d 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/SelectSourceLabware.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/SelectSourceLabware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/SelectTipRack.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/SelectTipRack.test.tsx index 39f9f7cb5fb..f4ee22bd2b9 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/SelectTipRack.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/SelectTipRack.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/SummaryAndSettings.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/SummaryAndSettings.test.tsx index 308737b9eed..0f5f7c7742c 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/SummaryAndSettings.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/SummaryAndSettings.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/ChangeTip.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/ChangeTip.test.tsx index 5e4f183ba8e..213633678e5 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/ChangeTip.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/ChangeTip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipDropLocation.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipDropLocation.test.tsx index c2b4a06e3fa..aed3d143b31 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipDropLocation.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipDropLocation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipManagement.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipManagement.test.tsx index 7b889b2d170..618153a8b53 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipManagement.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/TipManagement/TipManagement.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/QuickTransferFlow/__tests__/VolumeEntry.test.tsx b/app/src/organisms/QuickTransferFlow/__tests__/VolumeEntry.test.tsx index 007adf2e98e..8a14b9a5993 100644 --- a/app/src/organisms/QuickTransferFlow/__tests__/VolumeEntry.test.tsx +++ b/app/src/organisms/QuickTransferFlow/__tests__/VolumeEntry.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, afterEach, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDataDownload.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDataDownload.tsx index 5aae1a1425f..7bff8bdf29f 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDataDownload.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDataDownload.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { saveAs } from 'file-saver' import { useTranslation, Trans } from 'react-i18next' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationItems.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationItems.tsx index faae54b48d3..11ee8f60402 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationItems.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationItems.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationOverflowMenu.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationOverflowMenu.tsx index 03cb53b650a..36ba8fee26d 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationOverflowMenu.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/ModuleCalibrationOverflowMenu.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' @@ -54,7 +54,7 @@ export function ModuleCalibrationOverflowMenu({ setShowOverflowMenu, } = useMenuHandleClickOutside() - const [showModuleWizard, setShowModuleWizard] = React.useState(false) + const [showModuleWizard, setShowModuleWizard] = useState(false) const { isRunRunning: isRunning } = useRunStatuses() const [targetProps, tooltipProps] = useHoverTooltip() @@ -73,7 +73,7 @@ export function ModuleCalibrationOverflowMenu({ const [ prepCommandErrorMessage, setPrepCommandErrorMessage, - ] = React.useState('') + ] = useState('') const isEstopNotDisengaged = useIsEstopNotDisengaged(robotName) @@ -87,7 +87,7 @@ export function ModuleCalibrationOverflowMenu({ setShowModuleWizard(true) } - React.useEffect(() => { + useEffect(() => { if (isRunning) { updateRobotStatus(true) } diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/PipetteOffsetCalibrationItems.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/PipetteOffsetCalibrationItems.tsx index 09d59325975..d94c51c681d 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/PipetteOffsetCalibrationItems.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/PipetteOffsetCalibrationItems.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/TipLengthCalibrationItems.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/TipLengthCalibrationItems.tsx index 88b0e874003..9aea786c421 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/TipLengthCalibrationItems.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/TipLengthCalibrationItems.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import styled, { css } from 'styled-components' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationItems.test.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationItems.test.tsx index 77b2f3ee6ae..2fdd9694e5d 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationItems.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationItems.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationOverflowMenu.test.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationOverflowMenu.test.tsx index bf37956c884..cc7c1e847e1 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationOverflowMenu.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/ModuleCalibrationOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen, waitFor } from '@testing-library/react' import { when } from 'vitest-when' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/OverflowMenu.test.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/OverflowMenu.test.tsx index f112040edc5..3a01e166746 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/OverflowMenu.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/OverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/PipetteOffsetCalibrationItems.test.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/PipetteOffsetCalibrationItems.test.tsx index 09fe5652db1..2cd4c6077df 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/PipetteOffsetCalibrationItems.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/PipetteOffsetCalibrationItems.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/TipLengthCalibrationItems.test.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/TipLengthCalibrationItems.test.tsx index 44481da6f3d..71746c541c7 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/TipLengthCalibrationItems.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationDetails/__tests__/TipLengthCalibrationItems.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/CalibrationHealthCheck.tsx b/app/src/organisms/RobotSettingsCalibration/CalibrationHealthCheck.tsx index 275fe64ecfe..833dc965770 100644 --- a/app/src/organisms/RobotSettingsCalibration/CalibrationHealthCheck.tsx +++ b/app/src/organisms/RobotSettingsCalibration/CalibrationHealthCheck.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -74,7 +74,7 @@ export function CalibrationHealthCheck({ placement: TOOLTIP_LEFT, }) - const [showCalBlockModal, setShowCalBlockModal] = React.useState(false) + const [showCalBlockModal, setShowCalBlockModal] = useState(false) const deckCalibrationStatus = useDeckCalibrationStatus(robotName) const attachedPipettes = useAttachedPipettes() diff --git a/app/src/organisms/RobotSettingsCalibration/DeckCalibrationConfirmModal.tsx b/app/src/organisms/RobotSettingsCalibration/DeckCalibrationConfirmModal.tsx index c07cef244ed..215ff113fe6 100644 --- a/app/src/organisms/RobotSettingsCalibration/DeckCalibrationConfirmModal.tsx +++ b/app/src/organisms/RobotSettingsCalibration/DeckCalibrationConfirmModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/app/src/organisms/RobotSettingsCalibration/RobotSettingsDeckCalibration.tsx b/app/src/organisms/RobotSettingsCalibration/RobotSettingsDeckCalibration.tsx index 6b48db62339..48a34c166fe 100644 --- a/app/src/organisms/RobotSettingsCalibration/RobotSettingsDeckCalibration.tsx +++ b/app/src/organisms/RobotSettingsCalibration/RobotSettingsDeckCalibration.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useEffect } from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -26,7 +26,7 @@ export function RobotSettingsDeckCalibration({ robotName, }: RobotSettingsDeckCalibrationProps): JSX.Element { const { t } = useTranslation('device_settings') - const createRequestId = React.useRef(null) + const createRequestId = useRef(null) const robot = useRobot(robotName) const deckCalibrationData = useDeckCalibrationData(robot?.name) @@ -47,7 +47,7 @@ export function RobotSettingsDeckCalibration({ }) : t('not_calibrated') - React.useEffect(() => { + useEffect(() => { if (createStatus === RobotApi.SUCCESS) { createRequestId.current = null } diff --git a/app/src/organisms/RobotSettingsCalibration/RobotSettingsGripperCalibration.tsx b/app/src/organisms/RobotSettingsCalibration/RobotSettingsGripperCalibration.tsx index fef63c269ad..90cd9c9f4a8 100644 --- a/app/src/organisms/RobotSettingsCalibration/RobotSettingsGripperCalibration.tsx +++ b/app/src/organisms/RobotSettingsCalibration/RobotSettingsGripperCalibration.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' @@ -71,7 +71,7 @@ export function RobotSettingsGripperCalibration( setShowOverflowMenu(false) }, }) - const [showWizardFlow, setShowWizardFlow] = React.useState(false) + const [showWizardFlow, setShowWizardFlow] = useState(false) const isEstopNotDisengaged = useIsEstopNotDisengaged(robotName) const gripperCalibrationLastModified = diff --git a/app/src/organisms/RobotSettingsCalibration/RobotSettingsModuleCalibration.tsx b/app/src/organisms/RobotSettingsCalibration/RobotSettingsModuleCalibration.tsx index c6cec90fbba..31e0e3114aa 100644 --- a/app/src/organisms/RobotSettingsCalibration/RobotSettingsModuleCalibration.tsx +++ b/app/src/organisms/RobotSettingsCalibration/RobotSettingsModuleCalibration.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/RobotSettingsCalibration/RobotSettingsPipetteOffsetCalibration.tsx b/app/src/organisms/RobotSettingsCalibration/RobotSettingsPipetteOffsetCalibration.tsx index 8fb8da477ff..d066d2b74f0 100644 --- a/app/src/organisms/RobotSettingsCalibration/RobotSettingsPipetteOffsetCalibration.tsx +++ b/app/src/organisms/RobotSettingsCalibration/RobotSettingsPipetteOffsetCalibration.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/RobotSettingsCalibration/RobotSettingsTipLengthCalibration.tsx b/app/src/organisms/RobotSettingsCalibration/RobotSettingsTipLengthCalibration.tsx index effb3d6290d..ebca2db82c8 100644 --- a/app/src/organisms/RobotSettingsCalibration/RobotSettingsTipLengthCalibration.tsx +++ b/app/src/organisms/RobotSettingsCalibration/RobotSettingsTipLengthCalibration.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { getLabwareDefURI } from '@opentrons/shared-data' diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationDataDownload.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationDataDownload.test.tsx index cb5a764bc53..54e795a1d1e 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationDataDownload.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationDataDownload.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { describe, diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationHealthCheck.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationHealthCheck.test.tsx index f00ea136283..3c2f2c5b3db 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationHealthCheck.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/CalibrationHealthCheck.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import userEvent from '@testing-library/user-event' import { fireEvent, screen, waitFor } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsCalibration.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsCalibration.test.tsx index fa37b4d78b7..763963dfb76 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsCalibration.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsCalibration.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { when } from 'vitest-when' import { screen } from '@testing-library/react' import { describe, it, expect, beforeEach, vi } from 'vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsDeckCalibration.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsDeckCalibration.test.tsx index a51101bd50e..fb48e3c3ff5 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsDeckCalibration.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsDeckCalibration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsGripperCalibration.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsGripperCalibration.test.tsx index 3e5d952ea09..e4a4d48eea1 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsGripperCalibration.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsGripperCalibration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsModuleCalibration.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsModuleCalibration.test.tsx index 8c2f9fa9a4c..95b71a450af 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsModuleCalibration.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsModuleCalibration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsPipetteOffsetCalibration.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsPipetteOffsetCalibration.test.tsx index 5c88977ca7c..5133923e071 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsPipetteOffsetCalibration.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsPipetteOffsetCalibration.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { describe, it, vi, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsTipLengthCalibration.test.tsx b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsTipLengthCalibration.test.tsx index 0808a7f2262..b2934dceac4 100644 --- a/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsTipLengthCalibration.test.tsx +++ b/app/src/organisms/RobotSettingsCalibration/__tests__/RobotSettingsTipLengthCalibration.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, vi } from 'vitest' import { i18n } from '/app/i18n' diff --git a/app/src/organisms/RobotSettingsCalibration/index.tsx b/app/src/organisms/RobotSettingsCalibration/index.tsx index 22bff478880..cc6571ccf9c 100644 --- a/app/src/organisms/RobotSettingsCalibration/index.tsx +++ b/app/src/organisms/RobotSettingsCalibration/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -77,21 +77,21 @@ export function RobotSettingsCalibration({ 'robot_calibration', 'shared', ]) - const trackedRequestId = React.useRef(null) - const createRequestId = React.useRef(null) - const jogRequestId = React.useRef(null) + const trackedRequestId = useRef(null) + const createRequestId = useRef(null) + const jogRequestId = useRef(null) const [ showHowCalibrationWorksModal, setShowHowCalibrationWorksModal, - ] = React.useState(false) + ] = useState(false) const robot = useRobot(robotName) const notConnectable = robot?.status !== CONNECTABLE const isFlex = useIsFlex(robotName) const dispatch = useDispatch() - React.useEffect(() => { + useEffect(() => { dispatch(Sessions.fetchAllSessions(robotName)) }, [dispatch, robotName]) @@ -249,7 +249,7 @@ export function RobotSettingsCalibration({ }) } - React.useEffect(() => { + useEffect(() => { if (createStatus === RobotApi.SUCCESS) { createRequestId.current = null } diff --git a/app/src/organisms/RobotSetupHeader/index.tsx b/app/src/organisms/RobotSetupHeader/index.tsx index 3a192c28148..6b7a3fa1049 100644 --- a/app/src/organisms/RobotSetupHeader/index.tsx +++ b/app/src/organisms/RobotSetupHeader/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ALIGN_CENTER, diff --git a/app/src/organisms/RunProgressMeter/InterventionTicks.tsx b/app/src/organisms/RunProgressMeter/InterventionTicks.tsx index f8dfd722f17..8bab7b981af 100644 --- a/app/src/organisms/RunProgressMeter/InterventionTicks.tsx +++ b/app/src/organisms/RunProgressMeter/InterventionTicks.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import last from 'lodash/last' import { Tick } from './Tick' import type { RunTimeCommand } from '@opentrons/shared-data' diff --git a/app/src/organisms/RunProgressMeter/Tick.tsx b/app/src/organisms/RunProgressMeter/Tick.tsx index 5bb644f87b8..1976e8d4553 100644 --- a/app/src/organisms/RunProgressMeter/Tick.tsx +++ b/app/src/organisms/RunProgressMeter/Tick.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' diff --git a/app/src/organisms/RunProgressMeter/__tests__/InterventionTicks.test.tsx b/app/src/organisms/RunProgressMeter/__tests__/InterventionTicks.test.tsx index 8c25d7359d9..c6562476818 100644 --- a/app/src/organisms/RunProgressMeter/__tests__/InterventionTicks.test.tsx +++ b/app/src/organisms/RunProgressMeter/__tests__/InterventionTicks.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx b/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx index 21268acfddb..2c517f601e6 100644 --- a/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx +++ b/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/organisms/RunProgressMeter/hooks/useRunProgressCopy.tsx b/app/src/organisms/RunProgressMeter/hooks/useRunProgressCopy.tsx index ee5cce24cea..66e1960f939 100644 --- a/app/src/organisms/RunProgressMeter/hooks/useRunProgressCopy.tsx +++ b/app/src/organisms/RunProgressMeter/hooks/useRunProgressCopy.tsx @@ -2,7 +2,7 @@ import { RUN_STATUS_BLOCKED_BY_OPEN_DOOR, RUN_STATUS_IDLE, } from '@opentrons/api-client' -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { getCommandTextData } from '/app/molecules/Command/utils/getCommandTextData' import { LegacyStyledText } from '@opentrons/components' diff --git a/app/src/organisms/RunProgressMeter/index.tsx b/app/src/organisms/RunProgressMeter/index.tsx index de94bded5de..078ea646687 100644 --- a/app/src/organisms/RunProgressMeter/index.tsx +++ b/app/src/organisms/RunProgressMeter/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/app/src/organisms/SendProtocolToFlexSlideout/__tests__/SendProtocolToFlexSlideout.test.tsx b/app/src/organisms/SendProtocolToFlexSlideout/__tests__/SendProtocolToFlexSlideout.test.tsx index 2c7c9aebe1c..d9d4532af73 100644 --- a/app/src/organisms/SendProtocolToFlexSlideout/__tests__/SendProtocolToFlexSlideout.test.tsx +++ b/app/src/organisms/SendProtocolToFlexSlideout/__tests__/SendProtocolToFlexSlideout.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/SendProtocolToFlexSlideout/index.tsx b/app/src/organisms/SendProtocolToFlexSlideout/index.tsx index 969f080fb3a..176fa22e3c9 100644 --- a/app/src/organisms/SendProtocolToFlexSlideout/index.tsx +++ b/app/src/organisms/SendProtocolToFlexSlideout/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -52,7 +52,7 @@ export function SendProtocolToFlexSlideout( } = storedProtocolData const { t } = useTranslation(['protocol_details', 'protocol_list']) - const [selectedRobot, setSelectedRobot] = React.useState(null) + const [selectedRobot, setSelectedRobot] = useState(null) const isSelectedRobotOnDifferentSoftwareVersion = useIsRobotOnWrongVersionOfSoftware( selectedRobot?.name ?? '' diff --git a/app/src/organisms/TakeoverModal/TakeoverModal.tsx b/app/src/organisms/TakeoverModal/TakeoverModal.tsx index 713df38cdc7..b76d6e98d53 100644 --- a/app/src/organisms/TakeoverModal/TakeoverModal.tsx +++ b/app/src/organisms/TakeoverModal/TakeoverModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' diff --git a/app/src/organisms/TakeoverModal/__tests__/MaintenanceRunTakeover.test.tsx b/app/src/organisms/TakeoverModal/__tests__/MaintenanceRunTakeover.test.tsx index c67518c2ecc..94a59aa903a 100644 --- a/app/src/organisms/TakeoverModal/__tests__/MaintenanceRunTakeover.test.tsx +++ b/app/src/organisms/TakeoverModal/__tests__/MaintenanceRunTakeover.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/TakeoverModal/__tests__/TakeoverModal.test.tsx b/app/src/organisms/TakeoverModal/__tests__/TakeoverModal.test.tsx index 96314e1b6ce..a902544e4a0 100644 --- a/app/src/organisms/TakeoverModal/__tests__/TakeoverModal.test.tsx +++ b/app/src/organisms/TakeoverModal/__tests__/TakeoverModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/TakeoverModal/useMaintenanceRunTakeover.ts b/app/src/organisms/TakeoverModal/useMaintenanceRunTakeover.ts index 3c6373dee07..f166cc9a9d2 100644 --- a/app/src/organisms/TakeoverModal/useMaintenanceRunTakeover.ts +++ b/app/src/organisms/TakeoverModal/useMaintenanceRunTakeover.ts @@ -1,7 +1,7 @@ -import * as React from 'react' +import { useContext } from 'react' import { MaintenanceRunContext } from './MaintenanceRunStatusProvider' import type { MaintenanceRunStatus } from './MaintenanceRunStatusProvider' export function useMaintenanceRunTakeover(): MaintenanceRunStatus { - return React.useContext(MaintenanceRunContext) + return useContext(MaintenanceRunContext) } diff --git a/app/src/organisms/TaskList/TaskList.stories.tsx b/app/src/organisms/TaskList/TaskList.stories.tsx index b17bf6204d2..840ece49ed6 100644 --- a/app/src/organisms/TaskList/TaskList.stories.tsx +++ b/app/src/organisms/TaskList/TaskList.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { TaskList as TaskListComponent } from './' import type { Story, Meta } from '@storybook/react' diff --git a/app/src/organisms/TaskList/index.tsx b/app/src/organisms/TaskList/index.tsx index 0fd37fc0394..2cebd9b1be2 100644 --- a/app/src/organisms/TaskList/index.tsx +++ b/app/src/organisms/TaskList/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect, Fragment } from 'react' import { ALIGN_CENTER, @@ -134,7 +134,7 @@ function ProgressTrackerItem({ const isFinalSubTaskOfTaskList = isLastSubTask && isLastTask return ( - + {/* subtask circle icon component */} - + ) })} @@ -342,11 +342,11 @@ function Task({ const hasSubTasks = subTasks.length > 0 const isDisabled = generalTaskDisabledReason != null - const [isTaskOpen, setIsTaskOpen] = React.useState( + const [isTaskOpen, setIsTaskOpen] = useState( hasSubTasks && isActiveTask ) - React.useEffect(() => { + useEffect(() => { setIsTaskOpen(hasSubTasks && isActiveTask) }, [isActiveTask, hasSubTasks]) diff --git a/app/src/organisms/ToasterOven/ToasterContext.ts b/app/src/organisms/ToasterOven/ToasterContext.ts index 0634a22ae5d..3467da62872 100644 --- a/app/src/organisms/ToasterOven/ToasterContext.ts +++ b/app/src/organisms/ToasterOven/ToasterContext.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { createContext } from 'react' import type { ToastProps, @@ -25,7 +25,7 @@ export interface ToasterContextType { makeSnackbar: MakeSnackbar } -export const ToasterContext = React.createContext({ +export const ToasterContext = createContext({ eatToast: () => {}, makeToast: () => '', makeSnackbar: () => {}, diff --git a/app/src/organisms/ToasterOven/hooks.ts b/app/src/organisms/ToasterOven/hooks.ts index 5c37a0e4cb0..555a08768bb 100644 --- a/app/src/organisms/ToasterOven/hooks.ts +++ b/app/src/organisms/ToasterOven/hooks.ts @@ -1,11 +1,11 @@ -import * as React from 'react' +import { useContext } from 'react' import { ToasterContext } from './ToasterContext' import type { ToasterContextType } from './ToasterContext' export function useToaster(): ToasterContextType { - const { eatToast, makeToast, makeSnackbar } = React.useContext(ToasterContext) + const { eatToast, makeToast, makeSnackbar } = useContext(ToasterContext) return { eatToast, makeToast, makeSnackbar } } diff --git a/app/src/organisms/UpdateAppModal/__tests__/UpdateAppModal.test.tsx b/app/src/organisms/UpdateAppModal/__tests__/UpdateAppModal.test.tsx index 83cd713c2ef..3131bee25a3 100644 --- a/app/src/organisms/UpdateAppModal/__tests__/UpdateAppModal.test.tsx +++ b/app/src/organisms/UpdateAppModal/__tests__/UpdateAppModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/UpdateAppModal/index.tsx b/app/src/organisms/UpdateAppModal/index.tsx index 4b32029316c..450824c27f5 100644 --- a/app/src/organisms/UpdateAppModal/index.tsx +++ b/app/src/organisms/UpdateAppModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector, useDispatch } from 'react-redux' import styled, { css } from 'styled-components' import { useNavigate } from 'react-router-dom' diff --git a/app/src/organisms/UpdateRobotBanner/__tests__/UpdateRobotBanner.test.tsx b/app/src/organisms/UpdateRobotBanner/__tests__/UpdateRobotBanner.test.tsx index 6742d808999..e7d90f70ea3 100644 --- a/app/src/organisms/UpdateRobotBanner/__tests__/UpdateRobotBanner.test.tsx +++ b/app/src/organisms/UpdateRobotBanner/__tests__/UpdateRobotBanner.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/organisms/UpdateRobotBanner/index.tsx b/app/src/organisms/UpdateRobotBanner/index.tsx index 513cd4965e8..e5d7d2d0e85 100644 --- a/app/src/organisms/UpdateRobotBanner/index.tsx +++ b/app/src/organisms/UpdateRobotBanner/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/UpdateRobotSoftware/CheckUpdates.tsx b/app/src/organisms/UpdateRobotSoftware/CheckUpdates.tsx index e23ff5417f6..9df29bc6280 100644 --- a/app/src/organisms/UpdateRobotSoftware/CheckUpdates.tsx +++ b/app/src/organisms/UpdateRobotSoftware/CheckUpdates.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/UpdateRobotSoftware/CompleteUpdateSoftware.tsx b/app/src/organisms/UpdateRobotSoftware/CompleteUpdateSoftware.tsx index f75a1777146..9f29911ac88 100644 --- a/app/src/organisms/UpdateRobotSoftware/CompleteUpdateSoftware.tsx +++ b/app/src/organisms/UpdateRobotSoftware/CompleteUpdateSoftware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/UpdateRobotSoftware/ErrorUpdateSoftware.tsx b/app/src/organisms/UpdateRobotSoftware/ErrorUpdateSoftware.tsx index 22324c25b95..f1629e15b64 100644 --- a/app/src/organisms/UpdateRobotSoftware/ErrorUpdateSoftware.tsx +++ b/app/src/organisms/UpdateRobotSoftware/ErrorUpdateSoftware.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx b/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx index 35eed9fcc1b..27b466f06d9 100644 --- a/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx +++ b/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/UpdateRobotSoftware/UpdateSoftware.tsx b/app/src/organisms/UpdateRobotSoftware/UpdateSoftware.tsx index 67c0cd1a3bc..9c499d8a4f3 100644 --- a/app/src/organisms/UpdateRobotSoftware/UpdateSoftware.tsx +++ b/app/src/organisms/UpdateRobotSoftware/UpdateSoftware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/organisms/UpdateRobotSoftware/__tests__/CheckUpdates.test.tsx b/app/src/organisms/UpdateRobotSoftware/__tests__/CheckUpdates.test.tsx index 80bef11873f..d56c7305a0d 100644 --- a/app/src/organisms/UpdateRobotSoftware/__tests__/CheckUpdates.test.tsx +++ b/app/src/organisms/UpdateRobotSoftware/__tests__/CheckUpdates.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/organisms/UpdateRobotSoftware/__tests__/CompleteUpdateSoftware.test.tsx b/app/src/organisms/UpdateRobotSoftware/__tests__/CompleteUpdateSoftware.test.tsx index ab9f20849e1..b6b91424b92 100644 --- a/app/src/organisms/UpdateRobotSoftware/__tests__/CompleteUpdateSoftware.test.tsx +++ b/app/src/organisms/UpdateRobotSoftware/__tests__/CompleteUpdateSoftware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/UpdateRobotSoftware/__tests__/ErrorUpdateSoftware.test.tsx b/app/src/organisms/UpdateRobotSoftware/__tests__/ErrorUpdateSoftware.test.tsx index eef021fe01e..d1706a4bf18 100644 --- a/app/src/organisms/UpdateRobotSoftware/__tests__/ErrorUpdateSoftware.test.tsx +++ b/app/src/organisms/UpdateRobotSoftware/__tests__/ErrorUpdateSoftware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/UpdateRobotSoftware/__tests__/NoUpdateFound.test.tsx b/app/src/organisms/UpdateRobotSoftware/__tests__/NoUpdateFound.test.tsx index 5e6fec3bdca..2f276dc2f20 100644 --- a/app/src/organisms/UpdateRobotSoftware/__tests__/NoUpdateFound.test.tsx +++ b/app/src/organisms/UpdateRobotSoftware/__tests__/NoUpdateFound.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateRobotSoftware.test.tsx b/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateRobotSoftware.test.tsx index 86bbb93b1ec..9df863fe5ce 100644 --- a/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateRobotSoftware.test.tsx +++ b/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateRobotSoftware.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateSoftware.test.tsx b/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateSoftware.test.tsx index 2a54550eae2..93deeb27956 100644 --- a/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateSoftware.test.tsx +++ b/app/src/organisms/UpdateRobotSoftware/__tests__/UpdateSoftware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' diff --git a/app/src/organisms/UpdateRobotSoftware/index.tsx b/app/src/organisms/UpdateRobotSoftware/index.tsx index 42b907ddb17..785494410d4 100644 --- a/app/src/organisms/UpdateRobotSoftware/index.tsx +++ b/app/src/organisms/UpdateRobotSoftware/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import type { Dispatch } from '/app/redux/types' @@ -41,9 +41,9 @@ export function UpdateRobotSoftware( step: null, error: null, } - const [isDownloading, setIsDownloading] = React.useState(false) + const [isDownloading, setIsDownloading] = useState(false) - React.useEffect(() => { + useEffect(() => { // check isDownloading to avoid dispatching again if (!isDownloading) { setIsDownloading(true) diff --git a/app/src/organisms/WellSelection/index.tsx b/app/src/organisms/WellSelection/index.tsx index 19cd9e04363..656745c0056 100644 --- a/app/src/organisms/WellSelection/index.tsx +++ b/app/src/organisms/WellSelection/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import reduce from 'lodash/reduce' import { COLORS, Labware, RobotCoordinateSpace } from '@opentrons/components' @@ -33,7 +33,7 @@ export function WellSelection(props: WellSelectionProps): JSX.Element { selectWells, channels, } = props - const [highlightedWells, setHighlightedWells] = React.useState({}) + const [highlightedWells, setHighlightedWells] = useState({}) const _wellsFromSelected: ( selectedWells: WellGroup diff --git a/app/src/pages/Desktop/AppSettings/AdvancedSettings.tsx b/app/src/pages/Desktop/AppSettings/AdvancedSettings.tsx index 686e64ce782..78900fb719e 100644 --- a/app/src/pages/Desktop/AppSettings/AdvancedSettings.tsx +++ b/app/src/pages/Desktop/AppSettings/AdvancedSettings.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Box, SPACING } from '@opentrons/components' import { Divider } from '/app/atoms/structure' import { diff --git a/app/src/pages/Desktop/AppSettings/GeneralSettings.tsx b/app/src/pages/Desktop/AppSettings/GeneralSettings.tsx index e4931a8995c..96fd7ef0b35 100644 --- a/app/src/pages/Desktop/AppSettings/GeneralSettings.tsx +++ b/app/src/pages/Desktop/AppSettings/GeneralSettings.tsx @@ -1,5 +1,5 @@ // app info card with version and updated -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' @@ -60,22 +60,21 @@ export function GeneralSettings(): JSX.Element { const [ showPreviousVersionModal, setShowPreviousVersionModal, - ] = React.useState(false) + ] = useState(false) const updateAvailable = Boolean(useSelector(getAvailableShellUpdate)) - const [showUpdateBanner, setShowUpdateBanner] = React.useState( + const [showUpdateBanner, setShowUpdateBanner] = useState( updateAvailable ) - const [ - showConnectRobotSlideout, - setShowConnectRobotSlideout, - ] = React.useState(false) + const [showConnectRobotSlideout, setShowConnectRobotSlideout] = useState( + false + ) // may be enabled, disabled, or unknown (because config is loading) const updateAlertEnabled = useSelector((s: State) => { const ignored = getAlertIsPermanentlyIgnored(s, ALERT_APP_UPDATE_AVAILABLE) return ignored !== null ? !ignored : null }) - const [showUpdateModal, setShowUpdateModal] = React.useState(false) + const [showUpdateModal, setShowUpdateModal] = useState(false) const handleToggle = (): void => { if (updateAlertEnabled !== null) { dispatch( diff --git a/app/src/pages/Desktop/AppSettings/PrivacySettings.tsx b/app/src/pages/Desktop/AppSettings/PrivacySettings.tsx index b0e75b3671c..abe45b61fa6 100644 --- a/app/src/pages/Desktop/AppSettings/PrivacySettings.tsx +++ b/app/src/pages/Desktop/AppSettings/PrivacySettings.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' diff --git a/app/src/pages/Desktop/AppSettings/__test__/AdvancedSettings.test.tsx b/app/src/pages/Desktop/AppSettings/__test__/AdvancedSettings.test.tsx index 2b5bcca9faf..0a1fcdb5ee4 100644 --- a/app/src/pages/Desktop/AppSettings/__test__/AdvancedSettings.test.tsx +++ b/app/src/pages/Desktop/AppSettings/__test__/AdvancedSettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/pages/Desktop/AppSettings/__test__/AppSettings.test.tsx b/app/src/pages/Desktop/AppSettings/__test__/AppSettings.test.tsx index 5002dec5407..cff6b6f93aa 100644 --- a/app/src/pages/Desktop/AppSettings/__test__/AppSettings.test.tsx +++ b/app/src/pages/Desktop/AppSettings/__test__/AppSettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, beforeEach, it, expect, afterEach } from 'vitest' import { Route } from 'react-router' import { MemoryRouter, Routes } from 'react-router-dom' diff --git a/app/src/pages/Desktop/AppSettings/__test__/GeneralSettings.test.tsx b/app/src/pages/Desktop/AppSettings/__test__/GeneralSettings.test.tsx index 5965baac3e2..5cfd02e09a8 100644 --- a/app/src/pages/Desktop/AppSettings/__test__/GeneralSettings.test.tsx +++ b/app/src/pages/Desktop/AppSettings/__test__/GeneralSettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/pages/Desktop/AppSettings/__test__/PrivacySettings.test.tsx b/app/src/pages/Desktop/AppSettings/__test__/PrivacySettings.test.tsx index 9635ae518a7..3b0aaee80a4 100644 --- a/app/src/pages/Desktop/AppSettings/__test__/PrivacySettings.test.tsx +++ b/app/src/pages/Desktop/AppSettings/__test__/PrivacySettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe } from 'vitest' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/Desktop/AppSettings/index.tsx b/app/src/pages/Desktop/AppSettings/index.tsx index f11aa930187..00b8b5ca0a0 100644 --- a/app/src/pages/Desktop/AppSettings/index.tsx +++ b/app/src/pages/Desktop/AppSettings/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { Navigate, useParams } from 'react-router-dom' diff --git a/app/src/pages/Desktop/Devices/CalibrationDashboard/__tests__/CalibrationDashboard.test.tsx b/app/src/pages/Desktop/Devices/CalibrationDashboard/__tests__/CalibrationDashboard.test.tsx index d2212bad45c..f11f674ec3d 100644 --- a/app/src/pages/Desktop/Devices/CalibrationDashboard/__tests__/CalibrationDashboard.test.tsx +++ b/app/src/pages/Desktop/Devices/CalibrationDashboard/__tests__/CalibrationDashboard.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, it, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { MemoryRouter, Route, Routes } from 'react-router-dom' diff --git a/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateDeck.tsx b/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateDeck.tsx index 9ce182dd812..908ad25aa3a 100644 --- a/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateDeck.tsx +++ b/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateDeck.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { createPortal } from 'react-dom' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -26,11 +26,11 @@ const spinnerCommandBlockList: SessionCommandString[] = [ export function useDashboardCalibrateDeck( robotName: string ): [DashboardCalDeckInvoker, JSX.Element | null, boolean] { - const trackedRequestId = React.useRef(null) - const createRequestId = React.useRef(null) - const jogRequestId = React.useRef(null) - const exitBeforeDeckConfigCompletion = React.useRef(false) - const invalidateHandlerRef = React.useRef<(() => void) | undefined>() + const trackedRequestId = useRef(null) + const createRequestId = useRef(null) + const jogRequestId = useRef(null) + const exitBeforeDeckConfigCompletion = useRef(false) + const invalidateHandlerRef = useRef<(() => void) | undefined>() const { t } = useTranslation('robot_calibration') const deckCalSession: DeckCalibrationSession | null = useSelector( diff --git a/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibratePipOffset.tsx b/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibratePipOffset.tsx index b78a616f6cc..12fef601e17 100644 --- a/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibratePipOffset.tsx +++ b/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibratePipOffset.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useEffect } from 'react' import { createPortal } from 'react-dom' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -29,10 +29,10 @@ export function useDashboardCalibratePipOffset( robotName: string, onComplete: (() => unknown) | null = null ): [DashboardCalOffsetInvoker, JSX.Element | null] { - const createRequestId = React.useRef(null) - const deleteRequestId = React.useRef(null) - const jogRequestId = React.useRef(null) - const spinnerRequestId = React.useRef(null) + const createRequestId = useRef(null) + const deleteRequestId = useRef(null) + const jogRequestId = useRef(null) + const spinnerRequestId = useRef(null) const dispatch = useDispatch() const { t } = useTranslation('robot_calibration') @@ -112,7 +112,7 @@ export function useDashboardCalibratePipOffset( : null )?.status === RobotApi.PENDING - React.useEffect(() => { + useEffect(() => { if (shouldClose) { onComplete?.() deleteRequestId.current = null diff --git a/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateTipLength.tsx b/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateTipLength.tsx index d8da4848f5f..e26e485801a 100644 --- a/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateTipLength.tsx +++ b/app/src/pages/Desktop/Devices/CalibrationDashboard/hooks/useDashboardCalibrateTipLength.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState } from 'react' import { createPortal } from 'react-dom' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -32,15 +32,15 @@ const spinnerCommandBlockList: SessionCommandString[] = [ export function useDashboardCalibrateTipLength( robotName: string ): [DashboardCalTipLengthInvoker, JSX.Element | null] { - const createRequestId = React.useRef(null) - const trackedRequestId = React.useRef(null) - const jogRequestId = React.useRef(null) - const sessionParams = React.useRef< + const createRequestId = useRef(null) + const trackedRequestId = useRef(null) + const jogRequestId = useRef(null) + const sessionParams = useRef< | (Pick & Partial>) | null >(null) - const invalidateHandlerRef = React.useRef<(() => void) | undefined>() + const invalidateHandlerRef = useRef<(() => void) | undefined>() const dispatch = useDispatch() const { t } = useTranslation('robot_calibration') @@ -86,9 +86,9 @@ export function useDashboardCalibrateTipLength( ) const configHasCalibrationBlock = useSelector(getHasCalibrationBlock) - const [showCalBlockModal, setShowCalBlockModal] = React.useState< - boolean | null - >(null) + const [showCalBlockModal, setShowCalBlockModal] = useState( + null + ) const handleStartDashboardTipLengthCalSession: DashboardCalTipLengthInvoker = props => { const { params, hasBlockModalResponse, invalidateHandler } = props diff --git a/app/src/pages/Desktop/Devices/CalibrationDashboard/index.tsx b/app/src/pages/Desktop/Devices/CalibrationDashboard/index.tsx index 2a29daa1fd4..512dbdfe35d 100644 --- a/app/src/pages/Desktop/Devices/CalibrationDashboard/index.tsx +++ b/app/src/pages/Desktop/Devices/CalibrationDashboard/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useParams } from 'react-router-dom' import { ApiHostProvider } from '@opentrons/react-api-client' import { CalibrationTaskList } from '/app/organisms/CalibrationTaskList' diff --git a/app/src/pages/Desktop/Devices/DeviceDetails/DeviceDetailsComponent.tsx b/app/src/pages/Desktop/Devices/DeviceDetails/DeviceDetailsComponent.tsx index 63ed9ca0991..4812edcb0f5 100644 --- a/app/src/pages/Desktop/Devices/DeviceDetails/DeviceDetailsComponent.tsx +++ b/app/src/pages/Desktop/Devices/DeviceDetails/DeviceDetailsComponent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useEstopQuery } from '@opentrons/react-api-client' import { ALIGN_CENTER, diff --git a/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetails.test.tsx b/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetails.test.tsx index 4729c3d6b59..ff3963f95f3 100644 --- a/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetails.test.tsx +++ b/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetails.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { when } from 'vitest-when' import { screen } from '@testing-library/react' diff --git a/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetailsComponent.test.tsx b/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetailsComponent.test.tsx index a436cbe672a..418f638464d 100644 --- a/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetailsComponent.test.tsx +++ b/app/src/pages/Desktop/Devices/DeviceDetails/__tests__/DeviceDetailsComponent.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { when } from 'vitest-when' diff --git a/app/src/pages/Desktop/Devices/DeviceDetails/index.tsx b/app/src/pages/Desktop/Devices/DeviceDetails/index.tsx index 1a261c43b41..b96ffdb3b45 100644 --- a/app/src/pages/Desktop/Devices/DeviceDetails/index.tsx +++ b/app/src/pages/Desktop/Devices/DeviceDetails/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { Navigate, useParams } from 'react-router-dom' diff --git a/app/src/pages/Desktop/Devices/DevicesLanding/NewRobotSetupHelp.tsx b/app/src/pages/Desktop/Devices/DevicesLanding/NewRobotSetupHelp.tsx index c9c9ea6d2cd..80747a7607b 100644 --- a/app/src/pages/Desktop/Devices/DevicesLanding/NewRobotSetupHelp.tsx +++ b/app/src/pages/Desktop/Devices/DevicesLanding/NewRobotSetupHelp.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { @@ -24,9 +24,7 @@ const NEW_OT2_SETUP_SUPPORT_ARTICLE_HREF = export function NewRobotSetupHelp(): JSX.Element { const { t } = useTranslation(['devices_landing', 'shared', 'branded']) - const [showNewRobotHelpModal, setShowNewRobotHelpModal] = React.useState( - false - ) + const [showNewRobotHelpModal, setShowNewRobotHelpModal] = useState(false) return ( <> diff --git a/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/DevicesLanding.test.tsx b/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/DevicesLanding.test.tsx index b23625de551..b2548ac50ac 100644 --- a/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/DevicesLanding.test.tsx +++ b/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/DevicesLanding.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' diff --git a/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/NewRobotSetupHelp.test.tsx b/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/NewRobotSetupHelp.test.tsx index 7c21a22a938..cc90f46b41d 100644 --- a/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/NewRobotSetupHelp.test.tsx +++ b/app/src/pages/Desktop/Devices/DevicesLanding/__tests__/NewRobotSetupHelp.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { it, describe, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/Desktop/Devices/DevicesLanding/index.tsx b/app/src/pages/Desktop/Devices/DevicesLanding/index.tsx index 7ee8afd2993..7e53817e3ec 100644 --- a/app/src/pages/Desktop/Devices/DevicesLanding/index.tsx +++ b/app/src/pages/Desktop/Devices/DevicesLanding/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import partition from 'lodash/partition' diff --git a/app/src/pages/Desktop/Devices/ProtocolRunDetails/__tests__/ProtocolRunDetails.test.tsx b/app/src/pages/Desktop/Devices/ProtocolRunDetails/__tests__/ProtocolRunDetails.test.tsx index 67b7d33b206..192c2e6971d 100644 --- a/app/src/pages/Desktop/Devices/ProtocolRunDetails/__tests__/ProtocolRunDetails.test.tsx +++ b/app/src/pages/Desktop/Devices/ProtocolRunDetails/__tests__/ProtocolRunDetails.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { Route, MemoryRouter, Routes } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/Desktop/Devices/ProtocolRunDetails/index.tsx b/app/src/pages/Desktop/Devices/ProtocolRunDetails/index.tsx index 547f4169c07..53bc8d60c3a 100644 --- a/app/src/pages/Desktop/Devices/ProtocolRunDetails/index.tsx +++ b/app/src/pages/Desktop/Devices/ProtocolRunDetails/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect, useRef, useState } from 'react' import isEmpty from 'lodash/isEmpty' import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' @@ -136,7 +136,7 @@ export function ProtocolRunDetails(): JSX.Element | null { const robot = useRobot(robotName) useSyncRobotClock(robotName) - React.useEffect(() => { + useEffect(() => { dispatch(fetchProtocols()) }, [dispatch]) return robot != null ? ( @@ -177,11 +177,11 @@ interface PageContentsProps { function PageContents(props: PageContentsProps): JSX.Element { const { runId, robotName, protocolRunDetailsTab } = props const robotType = useRobotType(robotName) - const protocolRunHeaderRef = React.useRef(null) - const listRef = React.useRef(null) - const [jumpedIndex, setJumpedIndex] = React.useState(null) + const protocolRunHeaderRef = useRef(null) + const listRef = useRef(null) + const [jumpedIndex, setJumpedIndex] = useState(null) - React.useEffect(() => { + useEffect(() => { if (jumpedIndex != null) { setTimeout(() => { setJumpedIndex(null) @@ -189,7 +189,7 @@ function PageContents(props: PageContentsProps): JSX.Element { } }, [jumpedIndex]) - const [missingSteps, setMissingSteps] = React.useState< + const [missingSteps, setMissingSteps] = useState< ReturnType >(initialMissingSteps()) @@ -322,7 +322,7 @@ const SetupTab = (props: SetupTabProps): JSX.Element | null => { // On the initial render or when a run first begins, navigate to "run preview" if the run has started. // If "run again" is clicked, the user should NOT be directed back to the "setup" tab. - React.useEffect(() => { + useEffect(() => { if (runHasStarted && protocolRunDetailsTab !== 'run-preview') { navigate(`/devices/${robotName}/protocol-runs/${runId}/run-preview`) } @@ -351,7 +351,7 @@ const ParametersTab = (props: ParametersTabProps): JSX.Element | null => { const navigate = useNavigate() const disabled = mostRecentAnalysis == null - React.useEffect(() => { + useEffect(() => { if (disabled && protocolRunDetailsTab === 'runtime-parameters') { navigate(`/devices/${robotName}/protocol-runs/${runId}/run-preview`, { replace: true, @@ -393,7 +393,7 @@ const ModuleControlsTab = ( : 'not_available_for_a_run_in_progress' )}` - React.useEffect(() => { + useEffect(() => { if (disabled && protocolRunDetailsTab === 'module-controls') navigate(`/devices/${robotName}/protocol-runs/${runId}/run-preview`) }, [disabled, navigate, protocolRunDetailsTab, robotName, runId]) diff --git a/app/src/pages/Desktop/Devices/RobotSettings/__tests__/RobotSettings.test.tsx b/app/src/pages/Desktop/Devices/RobotSettings/__tests__/RobotSettings.test.tsx index aa8343c1bd8..7e0ed778aca 100644 --- a/app/src/pages/Desktop/Devices/RobotSettings/__tests__/RobotSettings.test.tsx +++ b/app/src/pages/Desktop/Devices/RobotSettings/__tests__/RobotSettings.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { Route, MemoryRouter, Routes } from 'react-router-dom' diff --git a/app/src/pages/Desktop/Devices/RobotSettings/index.tsx b/app/src/pages/Desktop/Devices/RobotSettings/index.tsx index 6ae85003218..ffabfc447ea 100644 --- a/app/src/pages/Desktop/Devices/RobotSettings/index.tsx +++ b/app/src/pages/Desktop/Devices/RobotSettings/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useParams, Navigate } from 'react-router-dom' @@ -48,9 +48,7 @@ export function RobotSettings(): JSX.Element | null { const robot = useRobot(robotName) const isCalibrationDisabled = robot?.status !== CONNECTABLE const isNetworkingDisabled = robot?.status === UNREACHABLE - const [showRobotBusyBanner, setShowRobotBusyBanner] = React.useState( - false - ) + const [showRobotBusyBanner, setShowRobotBusyBanner] = useState(false) const robotUpdateSession = useSelector(getRobotUpdateSession) const updateRobotStatus = (isRobotBusy: boolean): void => { diff --git a/app/src/pages/Desktop/Labware/__tests__/Labware.test.tsx b/app/src/pages/Desktop/Labware/__tests__/Labware.test.tsx index b5133473704..3c919b7f295 100644 --- a/app/src/pages/Desktop/Labware/__tests__/Labware.test.tsx +++ b/app/src/pages/Desktop/Labware/__tests__/Labware.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/Desktop/Labware/__tests__/hooks.test.tsx b/app/src/pages/Desktop/Labware/__tests__/hooks.test.tsx index 14783cd6fe5..5fe55c260dc 100644 --- a/app/src/pages/Desktop/Labware/__tests__/hooks.test.tsx +++ b/app/src/pages/Desktop/Labware/__tests__/hooks.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' diff --git a/app/src/pages/Desktop/Labware/index.tsx b/app/src/pages/Desktop/Labware/index.tsx index 955f8a26fc1..159e57c306e 100644 --- a/app/src/pages/Desktop/Labware/index.tsx +++ b/app/src/pages/Desktop/Labware/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import startCase from 'lodash/startCase' import { css } from 'styled-components' @@ -84,35 +84,33 @@ const SORT_BY_BUTTON_STYLE = css` export function Labware(): JSX.Element { const { t } = useTranslation(['labware_landing', 'shared']) const enableLabwareCreator = useFeatureFlag('enableLabwareCreator') - const [sortBy, setSortBy] = React.useState('alphabetical') - const [showSortByMenu, setShowSortByMenu] = React.useState(false) + const [sortBy, setSortBy] = useState('alphabetical') + const [showSortByMenu, setShowSortByMenu] = useState(false) const toggleSetShowSortByMenu = (): void => { setShowSortByMenu(!showSortByMenu) } const dispatch = useDispatch() - const [showLC, setShowLC] = React.useState(false) + const [showLC, setShowLC] = useState(false) const trackEvent = useTrackEvent() - const [filterBy, setFilterBy] = React.useState('all') + const [filterBy, setFilterBy] = useState('all') const { makeToast } = useToaster() const labware = useAllLabware(sortBy, filterBy) const { labwareFailureMessage, clearLabwareFailure } = useLabwareFailure() const { newLabwareName, clearLabwareName } = useNewLabwareName() - const [showAddLabwareSlideout, setShowAddLabwareSlideout] = React.useState( - false - ) + const [showAddLabwareSlideout, setShowAddLabwareSlideout] = useState(false) const [ currentLabwareDef, setCurrentLabwareDef, - ] = React.useState(null) + ] = useState(null) const sortOverflowWrapperRef = useOnClickOutside({ onClickOutside: () => { setShowSortByMenu(false) }, }) - React.useEffect(() => { + useEffect(() => { if (labwareFailureMessage != null) { setShowAddLabwareSlideout(false) makeToast(labwareFailureMessage, ERROR_TOAST, { diff --git a/app/src/pages/Desktop/Protocols/ProtocolDetails/ProtocolTimeline.tsx b/app/src/pages/Desktop/Protocols/ProtocolDetails/ProtocolTimeline.tsx index affaf82f9f3..f113d863888 100644 --- a/app/src/pages/Desktop/Protocols/ProtocolDetails/ProtocolTimeline.tsx +++ b/app/src/pages/Desktop/Protocols/ProtocolDetails/ProtocolTimeline.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useParams } from 'react-router-dom' import { useDispatch, useSelector } from 'react-redux' import { Icon, Box, SPACING } from '@opentrons/components' @@ -17,7 +17,7 @@ export function ProtocolTimeline(): JSX.Element { getStoredProtocol(state, protocolKey) ) - React.useEffect(() => { + useEffect(() => { dispatch(fetchProtocols()) }, []) diff --git a/app/src/pages/Desktop/Protocols/ProtocolDetails/__tests__/ProtocolDetails.test.tsx b/app/src/pages/Desktop/Protocols/ProtocolDetails/__tests__/ProtocolDetails.test.tsx index e51038afbc9..c710350180a 100644 --- a/app/src/pages/Desktop/Protocols/ProtocolDetails/__tests__/ProtocolDetails.test.tsx +++ b/app/src/pages/Desktop/Protocols/ProtocolDetails/__tests__/ProtocolDetails.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' import { Route, MemoryRouter, Routes } from 'react-router-dom' diff --git a/app/src/pages/Desktop/Protocols/ProtocolDetails/index.tsx b/app/src/pages/Desktop/Protocols/ProtocolDetails/index.tsx index e147fab13b5..d2e97de4147 100644 --- a/app/src/pages/Desktop/Protocols/ProtocolDetails/index.tsx +++ b/app/src/pages/Desktop/Protocols/ProtocolDetails/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useParams, Navigate } from 'react-router-dom' import { useDispatch, useSelector } from 'react-redux' @@ -18,7 +18,7 @@ export function ProtocolDetails(): JSX.Element { getStoredProtocol(state, protocolKey) ) - React.useEffect(() => { + useEffect(() => { dispatch(fetchProtocols()) }, [dispatch]) diff --git a/app/src/pages/Desktop/Protocols/ProtocolsLanding/__tests__/ProtocolsLanding.test.tsx b/app/src/pages/Desktop/Protocols/ProtocolsLanding/__tests__/ProtocolsLanding.test.tsx index 61a35c9aefc..3b00caf21dd 100644 --- a/app/src/pages/Desktop/Protocols/ProtocolsLanding/__tests__/ProtocolsLanding.test.tsx +++ b/app/src/pages/Desktop/Protocols/ProtocolsLanding/__tests__/ProtocolsLanding.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/pages/Desktop/Protocols/ProtocolsLanding/index.tsx b/app/src/pages/Desktop/Protocols/ProtocolsLanding/index.tsx index 628594247c6..e600441fc00 100644 --- a/app/src/pages/Desktop/Protocols/ProtocolsLanding/index.tsx +++ b/app/src/pages/Desktop/Protocols/ProtocolsLanding/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { fetchProtocols, getStoredProtocols } from '/app/redux/protocol-storage' import { ProtocolsEmptyState } from '/app/organisms/ProtocolsLanding/ProtocolsEmptyState' @@ -11,7 +11,7 @@ export function ProtocolsLanding(): JSX.Element { const storedProtocols = useSelector((state: State) => getStoredProtocols(state) ) - React.useEffect(() => { + useEffect(() => { dispatch(fetchProtocols()) }, [dispatch]) diff --git a/app/src/pages/ODD/ConnectViaEthernet/DisplayConnectionStatus.tsx b/app/src/pages/ODD/ConnectViaEthernet/DisplayConnectionStatus.tsx index 90bd374b948..746b04f2e24 100644 --- a/app/src/pages/ODD/ConnectViaEthernet/DisplayConnectionStatus.tsx +++ b/app/src/pages/ODD/ConnectViaEthernet/DisplayConnectionStatus.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/pages/ODD/ConnectViaEthernet/TitleHeader.tsx b/app/src/pages/ODD/ConnectViaEthernet/TitleHeader.tsx index c837499c22b..30715fdab2f 100644 --- a/app/src/pages/ODD/ConnectViaEthernet/TitleHeader.tsx +++ b/app/src/pages/ODD/ConnectViaEthernet/TitleHeader.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useNavigate } from 'react-router-dom' import { diff --git a/app/src/pages/ODD/ConnectViaEthernet/__tests__/ConnectViaEthernet.test.tsx b/app/src/pages/ODD/ConnectViaEthernet/__tests__/ConnectViaEthernet.test.tsx index c3288101571..c785d8c5e88 100644 --- a/app/src/pages/ODD/ConnectViaEthernet/__tests__/ConnectViaEthernet.test.tsx +++ b/app/src/pages/ODD/ConnectViaEthernet/__tests__/ConnectViaEthernet.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { vi, it, describe, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ConnectViaEthernet/__tests__/DisplayConnectionStatus.test.tsx b/app/src/pages/ODD/ConnectViaEthernet/__tests__/DisplayConnectionStatus.test.tsx index 17bbb8e85b1..9efbfd5c3dc 100644 --- a/app/src/pages/ODD/ConnectViaEthernet/__tests__/DisplayConnectionStatus.test.tsx +++ b/app/src/pages/ODD/ConnectViaEthernet/__tests__/DisplayConnectionStatus.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ConnectViaEthernet/__tests__/TitleHeader.test.tsx b/app/src/pages/ODD/ConnectViaEthernet/__tests__/TitleHeader.test.tsx index 8b40ae71671..cffa8e9c63a 100644 --- a/app/src/pages/ODD/ConnectViaEthernet/__tests__/TitleHeader.test.tsx +++ b/app/src/pages/ODD/ConnectViaEthernet/__tests__/TitleHeader.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ConnectViaEthernet/index.tsx b/app/src/pages/ODD/ConnectViaEthernet/index.tsx index fe141f853ae..644d0616e1e 100644 --- a/app/src/pages/ODD/ConnectViaEthernet/index.tsx +++ b/app/src/pages/ODD/ConnectViaEthernet/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' @@ -28,7 +28,7 @@ export function ConnectViaEthernet(): JSX.Element { const [ showNetworkDetailsModal, setShowNetworkDetailsModal, - ] = React.useState(false) + ] = useState(false) const { ethernet } = useSelector((state: State) => getNetworkInterfaces(state, robotName) diff --git a/app/src/pages/ODD/ConnectViaUSB/_tests__/ConnectedViaUSB.test.tsx b/app/src/pages/ODD/ConnectViaUSB/_tests__/ConnectedViaUSB.test.tsx index dea215d9026..4072cd1a7a3 100644 --- a/app/src/pages/ODD/ConnectViaUSB/_tests__/ConnectedViaUSB.test.tsx +++ b/app/src/pages/ODD/ConnectViaUSB/_tests__/ConnectedViaUSB.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent } from '@testing-library/react' diff --git a/app/src/pages/ODD/ConnectViaUSB/index.tsx b/app/src/pages/ODD/ConnectViaUSB/index.tsx index e1ff45917e0..40ae95e63cf 100644 --- a/app/src/pages/ODD/ConnectViaUSB/index.tsx +++ b/app/src/pages/ODD/ConnectViaUSB/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { diff --git a/app/src/pages/ODD/ConnectViaWifi/SelectAuthenticationType.tsx b/app/src/pages/ODD/ConnectViaWifi/SelectAuthenticationType.tsx index 9d367353d53..ad033d3ba7e 100644 --- a/app/src/pages/ODD/ConnectViaWifi/SelectAuthenticationType.tsx +++ b/app/src/pages/ODD/ConnectViaWifi/SelectAuthenticationType.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Flex, DIRECTION_COLUMN } from '@opentrons/components' diff --git a/app/src/pages/ODD/ConnectViaWifi/SetWifiCred.tsx b/app/src/pages/ODD/ConnectViaWifi/SetWifiCred.tsx index 0c022ea0f99..4895f698b72 100644 --- a/app/src/pages/ODD/ConnectViaWifi/SetWifiCred.tsx +++ b/app/src/pages/ODD/ConnectViaWifi/SetWifiCred.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { Flex, DIRECTION_COLUMN } from '@opentrons/components' diff --git a/app/src/pages/ODD/ConnectViaWifi/WifiConnectStatus.tsx b/app/src/pages/ODD/ConnectViaWifi/WifiConnectStatus.tsx index f20e32ccb01..f00e61c6471 100644 --- a/app/src/pages/ODD/ConnectViaWifi/WifiConnectStatus.tsx +++ b/app/src/pages/ODD/ConnectViaWifi/WifiConnectStatus.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Flex, DIRECTION_COLUMN, SPACING } from '@opentrons/components' diff --git a/app/src/pages/ODD/ConnectViaWifi/__tests__/ConnectViaWifi.test.tsx b/app/src/pages/ODD/ConnectViaWifi/__tests__/ConnectViaWifi.test.tsx index 52c0e3c95dd..004ba7b0762 100644 --- a/app/src/pages/ODD/ConnectViaWifi/__tests__/ConnectViaWifi.test.tsx +++ b/app/src/pages/ODD/ConnectViaWifi/__tests__/ConnectViaWifi.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ConnectViaWifi/index.tsx b/app/src/pages/ODD/ConnectViaWifi/index.tsx index df153941a3b..54555b85f53 100644 --- a/app/src/pages/ODD/ConnectViaWifi/index.tsx +++ b/app/src/pages/ODD/ConnectViaWifi/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import last from 'lodash/last' @@ -27,16 +27,15 @@ export type WifiScreenOption = | 'WifiConnectStatus' export function ConnectViaWifi(): JSX.Element { - const [selectedSsid, setSelectedSsid] = React.useState('') - const [ - selectedAuthType, - setSelectedAuthType, - ] = React.useState('wpa-psk') + const [selectedSsid, setSelectedSsid] = useState('') + const [selectedAuthType, setSelectedAuthType] = useState( + 'wpa-psk' + ) - const [currentOption, setCurrentOption] = React.useState( + const [currentOption, setCurrentOption] = useState( 'WifiList' ) - const [password, setPassword] = React.useState('') + const [password, setPassword] = useState('') const localRobot = useSelector(getLocalRobot) const robotName = localRobot?.name != null ? localRobot.name : 'no name' const list = useWifiList(robotName, WIFI_LIST_POLL_MS) diff --git a/app/src/pages/ODD/DeckConfiguration/__tests__/DeckConfiguration.test.tsx b/app/src/pages/ODD/DeckConfiguration/__tests__/DeckConfiguration.test.tsx index 9715b60b09a..796e40cb6ee 100644 --- a/app/src/pages/ODD/DeckConfiguration/__tests__/DeckConfiguration.test.tsx +++ b/app/src/pages/ODD/DeckConfiguration/__tests__/DeckConfiguration.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MemoryRouter } from 'react-router-dom' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/EmergencyStop/__tests__/EmergencyStop.test.tsx b/app/src/pages/ODD/EmergencyStop/__tests__/EmergencyStop.test.tsx index 2bfff093233..428e276c2e8 100644 --- a/app/src/pages/ODD/EmergencyStop/__tests__/EmergencyStop.test.tsx +++ b/app/src/pages/ODD/EmergencyStop/__tests__/EmergencyStop.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { useEstopQuery } from '@opentrons/react-api-client' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/EmergencyStop/index.tsx b/app/src/pages/ODD/EmergencyStop/index.tsx index 92806b6adef..7cca1beb9fd 100644 --- a/app/src/pages/ODD/EmergencyStop/index.tsx +++ b/app/src/pages/ODD/EmergencyStop/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' diff --git a/app/src/pages/ODD/InitialLoadingScreen/__tests__/InitialLoadingScreen.test.tsx b/app/src/pages/ODD/InitialLoadingScreen/__tests__/InitialLoadingScreen.test.tsx index 114b09ebb3f..e9b45591b4b 100644 --- a/app/src/pages/ODD/InitialLoadingScreen/__tests__/InitialLoadingScreen.test.tsx +++ b/app/src/pages/ODD/InitialLoadingScreen/__tests__/InitialLoadingScreen.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/InitialLoadingScreen/index.tsx b/app/src/pages/ODD/InitialLoadingScreen/index.tsx index 9bbda2e6493..f35fad13b56 100644 --- a/app/src/pages/ODD/InitialLoadingScreen/index.tsx +++ b/app/src/pages/ODD/InitialLoadingScreen/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { ALIGN_CENTER, diff --git a/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetail.test.tsx b/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetail.test.tsx index 0138e603d46..f9efce16e0d 100644 --- a/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetail.test.tsx +++ b/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetail.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' import { useParams } from 'react-router-dom' diff --git a/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetailOverflowMenu.test.tsx b/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetailOverflowMenu.test.tsx index ea1690e90fc..2137b52ed8f 100644 --- a/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetailOverflowMenu.test.tsx +++ b/app/src/pages/ODD/InstrumentDetail/__tests__/InstrumentDetailOverflowMenu.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import NiceModal from '@ebay/nice-modal-react' import { fireEvent, screen } from '@testing-library/react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' diff --git a/app/src/pages/ODD/InstrumentDetail/index.tsx b/app/src/pages/ODD/InstrumentDetail/index.tsx index 71664ee5f20..a3cce17d0a2 100644 --- a/app/src/pages/ODD/InstrumentDetail/index.tsx +++ b/app/src/pages/ODD/InstrumentDetail/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useParams } from 'react-router-dom' import styled from 'styled-components' import { createPortal } from 'react-dom' diff --git a/app/src/pages/ODD/InstrumentsDashboard/PipetteRecalibrationODDWarning.tsx b/app/src/pages/ODD/InstrumentsDashboard/PipetteRecalibrationODDWarning.tsx index 95031cf91c5..1420204a492 100644 --- a/app/src/pages/ODD/InstrumentsDashboard/PipetteRecalibrationODDWarning.tsx +++ b/app/src/pages/ODD/InstrumentsDashboard/PipetteRecalibrationODDWarning.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation, Trans } from 'react-i18next' import { ALIGN_CENTER, @@ -15,7 +15,7 @@ import { export const PipetteRecalibrationODDWarning = (): JSX.Element | null => { const { t } = useTranslation('instruments_dashboard') - const [showBanner, setShowBanner] = React.useState(true) + const [showBanner, setShowBanner] = useState(true) if (!showBanner) return null return ( diff --git a/app/src/pages/ODD/InstrumentsDashboard/__tests__/InstrumentsDashboard.test.tsx b/app/src/pages/ODD/InstrumentsDashboard/__tests__/InstrumentsDashboard.test.tsx index 2b97dc274f5..f342bc1c69b 100644 --- a/app/src/pages/ODD/InstrumentsDashboard/__tests__/InstrumentsDashboard.test.tsx +++ b/app/src/pages/ODD/InstrumentsDashboard/__tests__/InstrumentsDashboard.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Route, MemoryRouter, Routes } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/pages/ODD/InstrumentsDashboard/__tests__/PipetteRecalibrationODDWarning.test.tsx b/app/src/pages/ODD/InstrumentsDashboard/__tests__/PipetteRecalibrationODDWarning.test.tsx index 0286a6571df..afe42954cb0 100644 --- a/app/src/pages/ODD/InstrumentsDashboard/__tests__/PipetteRecalibrationODDWarning.test.tsx +++ b/app/src/pages/ODD/InstrumentsDashboard/__tests__/PipetteRecalibrationODDWarning.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { screen } from '@testing-library/react' import { describe, it } from 'vitest' diff --git a/app/src/pages/ODD/InstrumentsDashboard/index.tsx b/app/src/pages/ODD/InstrumentsDashboard/index.tsx index 63d12a78303..0b3d1ca00e1 100644 --- a/app/src/pages/ODD/InstrumentsDashboard/index.tsx +++ b/app/src/pages/ODD/InstrumentsDashboard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useInstrumentsQuery } from '@opentrons/react-api-client' import { DIRECTION_COLUMN, Flex, SPACING } from '@opentrons/components' import { PipetteWizardFlows } from '/app/organisms/PipetteWizardFlows' @@ -15,7 +15,7 @@ export const InstrumentsDashboard = (): JSX.Element => { const { data: attachedInstruments } = useInstrumentsQuery({ refetchInterval: FETCH_PIPETTE_CAL_POLL, }) - const [wizardProps, setWizardProps] = React.useState< + const [wizardProps, setWizardProps] = useState< | React.ComponentProps | React.ComponentProps | null diff --git a/app/src/pages/ODD/NameRobot/__tests__/NameRobot.test.tsx b/app/src/pages/ODD/NameRobot/__tests__/NameRobot.test.tsx index 48657c9001d..22074b36d39 100644 --- a/app/src/pages/ODD/NameRobot/__tests__/NameRobot.test.tsx +++ b/app/src/pages/ODD/NameRobot/__tests__/NameRobot.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen, waitFor } from '@testing-library/react' diff --git a/app/src/pages/ODD/NameRobot/index.tsx b/app/src/pages/ODD/NameRobot/index.tsx index 0fefc554e7a..6649c573acf 100644 --- a/app/src/pages/ODD/NameRobot/index.tsx +++ b/app/src/pages/ODD/NameRobot/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useRef } from 'react' import { Controller, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' @@ -53,12 +53,11 @@ export function NameRobot(): JSX.Element { const localRobot = useSelector(getLocalRobot) const ipAddress = localRobot?.ip const previousName = localRobot?.name != null ? localRobot.name : null - const [newName, setNewName] = React.useState('') - const [ - isShowConfirmRobotName, - setIsShowConfirmRobotName, - ] = React.useState(false) - const keyboardRef = React.useRef(null) + const [newName, setNewName] = useState('') + const [isShowConfirmRobotName, setIsShowConfirmRobotName] = useState( + false + ) + const keyboardRef = useRef(null) const dispatch = useDispatch() const isUnboxingFlowOngoing = useIsUnboxingFlowOngoing() diff --git a/app/src/pages/ODD/NetworkSetupMenu/__tests__/NetworkSetupMenu.test.tsx b/app/src/pages/ODD/NetworkSetupMenu/__tests__/NetworkSetupMenu.test.tsx index f6bae4e30f6..f1f8dccd460 100644 --- a/app/src/pages/ODD/NetworkSetupMenu/__tests__/NetworkSetupMenu.test.tsx +++ b/app/src/pages/ODD/NetworkSetupMenu/__tests__/NetworkSetupMenu.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/NetworkSetupMenu/index.tsx b/app/src/pages/ODD/NetworkSetupMenu/index.tsx index a453dc5e944..ee23fef45af 100644 --- a/app/src/pages/ODD/NetworkSetupMenu/index.tsx +++ b/app/src/pages/ODD/NetworkSetupMenu/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/pages/ODD/ProtocolDashboard/DeleteProtocolConfirmationModal.tsx b/app/src/pages/ODD/ProtocolDashboard/DeleteProtocolConfirmationModal.tsx index 8cd2cca8468..2fed2b2efee 100644 --- a/app/src/pages/ODD/ProtocolDashboard/DeleteProtocolConfirmationModal.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/DeleteProtocolConfirmationModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useQueryClient } from 'react-query' import { useTranslation } from 'react-i18next' import styled from 'styled-components' @@ -34,7 +34,7 @@ export function DeleteProtocolConfirmationModal({ }: DeleteProtocolConfirmationModalProps): JSX.Element { const { i18n, t } = useTranslation(['protocol_list', 'shared']) const { makeSnackbar } = useToaster() - const [showIcon, setShowIcon] = React.useState(false) + const [showIcon, setShowIcon] = useState(false) const modalHeader: OddModalHeaderBaseProps = { title: t('delete_this_protocol'), iconName: 'ot-alert', diff --git a/app/src/pages/ODD/ProtocolDashboard/LongPressModal.tsx b/app/src/pages/ODD/ProtocolDashboard/LongPressModal.tsx index 993cd6eba05..aee792f5ae0 100644 --- a/app/src/pages/ODD/ProtocolDashboard/LongPressModal.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/LongPressModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' @@ -44,7 +44,7 @@ export function LongPressModal({ const pinned = pinnedProtocolIds.includes(protocolId) - const [showMaxPinsAlert, setShowMaxPinsAlert] = React.useState(false) + const [showMaxPinsAlert, setShowMaxPinsAlert] = useState(false) // This looks totally bonkers, and it is. This construction is to make // it easier to use in unit tests, where we have to mock both the mutation diff --git a/app/src/pages/ODD/ProtocolDashboard/NoProtocols.tsx b/app/src/pages/ODD/ProtocolDashboard/NoProtocols.tsx index da3d9af98e3..1c1810a42da 100644 --- a/app/src/pages/ODD/ProtocolDashboard/NoProtocols.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/NoProtocols.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/pages/ODD/ProtocolDashboard/PinnedProtocolCarousel.tsx b/app/src/pages/ODD/ProtocolDashboard/PinnedProtocolCarousel.tsx index d1afc219d0c..59e9fc5c117 100644 --- a/app/src/pages/ODD/ProtocolDashboard/PinnedProtocolCarousel.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/PinnedProtocolCarousel.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ALIGN_FLEX_START, DIRECTION_ROW, diff --git a/app/src/pages/ODD/ProtocolDashboard/__tests__/DeleteProtocolConfirmationModal.test.tsx b/app/src/pages/ODD/ProtocolDashboard/__tests__/DeleteProtocolConfirmationModal.test.tsx index 34edf30a768..1c55405dbde 100644 --- a/app/src/pages/ODD/ProtocolDashboard/__tests__/DeleteProtocolConfirmationModal.test.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/__tests__/DeleteProtocolConfirmationModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { act, fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ProtocolDashboard/__tests__/LongPressModal.test.tsx b/app/src/pages/ODD/ProtocolDashboard/__tests__/LongPressModal.test.tsx index 5bb79efbba4..777e8d92a39 100644 --- a/app/src/pages/ODD/ProtocolDashboard/__tests__/LongPressModal.test.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/__tests__/LongPressModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/ProtocolDashboard/__tests__/NoProtocols.test.tsx b/app/src/pages/ODD/ProtocolDashboard/__tests__/NoProtocols.test.tsx index d8a31bbbddb..7e78825b6f0 100644 --- a/app/src/pages/ODD/ProtocolDashboard/__tests__/NoProtocols.test.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/__tests__/NoProtocols.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' import { i18n } from '/app/i18n' diff --git a/app/src/pages/ODD/ProtocolDashboard/__tests__/PinnedProtocol.test.tsx b/app/src/pages/ODD/ProtocolDashboard/__tests__/PinnedProtocol.test.tsx index 04bbb95aaf2..f92904573d0 100644 --- a/app/src/pages/ODD/ProtocolDashboard/__tests__/PinnedProtocol.test.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/__tests__/PinnedProtocol.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { act, fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/ProtocolDashboard/__tests__/ProtocolCard.test.tsx b/app/src/pages/ODD/ProtocolDashboard/__tests__/ProtocolCard.test.tsx index bb829a3d9d9..c26b429e29e 100644 --- a/app/src/pages/ODD/ProtocolDashboard/__tests__/ProtocolCard.test.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/__tests__/ProtocolCard.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { act, fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/ProtocolDashboard/index.tsx b/app/src/pages/ODD/ProtocolDashboard/index.tsx index acb04b2fc49..49b36b0c112 100644 --- a/app/src/pages/ODD/ProtocolDashboard/index.tsx +++ b/app/src/pages/ODD/ProtocolDashboard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -39,17 +39,16 @@ export function ProtocolDashboard(): JSX.Element { const runs = useNotifyAllRunsQuery() const { t } = useTranslation('protocol_info') const dispatch = useDispatch() - const [navMenuIsOpened, setNavMenuIsOpened] = React.useState(false) - const [ - longPressModalIsOpened, - setLongPressModalOpened, - ] = React.useState(false) + const [navMenuIsOpened, setNavMenuIsOpened] = useState(false) + const [longPressModalIsOpened, setLongPressModalOpened] = useState( + false + ) const [ showDeleteConfirmationModal, setShowDeleteConfirmationModal, - ] = React.useState(false) - const [targetProtocolId, setTargetProtocolId] = React.useState('') - const [isRequiredCSV, setIsRequiredCSV] = React.useState(false) + ] = useState(false) + const [targetProtocolId, setTargetProtocolId] = useState('') + const [isRequiredCSV, setIsRequiredCSV] = useState(false) const sortBy = useSelector(getProtocolsOnDeviceSortKey) ?? 'alphabetical' const protocolsData = protocols.data?.data.filter( diff --git a/app/src/pages/ODD/ProtocolDetails/Deck.tsx b/app/src/pages/ODD/ProtocolDetails/Deck.tsx index 21da4928dd1..c8234628467 100644 --- a/app/src/pages/ODD/ProtocolDetails/Deck.tsx +++ b/app/src/pages/ODD/ProtocolDetails/Deck.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import last from 'lodash/last' import { Flex, ProtocolDeck, SPACING } from '@opentrons/components' @@ -30,8 +30,8 @@ export const Deck = (props: { protocolId: string }): JSX.Element => { const [ showLabwareDetailsModal, setShowLabwareDetailsModal, - ] = React.useState(false) - const [selectedLabware, setSelectedLabware] = React.useState< + ] = useState(false) + const [selectedLabware, setSelectedLabware] = useState< | (LabwareDefinition2 & { location: LabwareLocation nickName: string | null diff --git a/app/src/pages/ODD/ProtocolDetails/EmptySection.tsx b/app/src/pages/ODD/ProtocolDetails/EmptySection.tsx index c0059eeecab..16346f230be 100644 --- a/app/src/pages/ODD/ProtocolDetails/EmptySection.tsx +++ b/app/src/pages/ODD/ProtocolDetails/EmptySection.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ALIGN_CENTER, BORDERS, diff --git a/app/src/pages/ODD/ProtocolDetails/Hardware.tsx b/app/src/pages/ODD/ProtocolDetails/Hardware.tsx index e25c0222225..7d9bd16247d 100644 --- a/app/src/pages/ODD/ProtocolDetails/Hardware.tsx +++ b/app/src/pages/ODD/ProtocolDetails/Hardware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/app/src/pages/ODD/ProtocolDetails/Labware.tsx b/app/src/pages/ODD/ProtocolDetails/Labware.tsx index 90e9ad6e823..a8e765e0cff 100644 --- a/app/src/pages/ODD/ProtocolDetails/Labware.tsx +++ b/app/src/pages/ODD/ProtocolDetails/Labware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/app/src/pages/ODD/ProtocolDetails/Liquids.tsx b/app/src/pages/ODD/ProtocolDetails/Liquids.tsx index ad6a1e8e85e..85c1449c686 100644 --- a/app/src/pages/ODD/ProtocolDetails/Liquids.tsx +++ b/app/src/pages/ODD/ProtocolDetails/Liquids.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import last from 'lodash/last' import { useTranslation } from 'react-i18next' import styled from 'styled-components' diff --git a/app/src/pages/ODD/ProtocolDetails/Parameters.tsx b/app/src/pages/ODD/ProtocolDetails/Parameters.tsx index 71120f320a3..4c880423b04 100644 --- a/app/src/pages/ODD/ProtocolDetails/Parameters.tsx +++ b/app/src/pages/ODD/ProtocolDetails/Parameters.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/app/src/pages/ODD/ProtocolDetails/__tests__/Deck.test.tsx b/app/src/pages/ODD/ProtocolDetails/__tests__/Deck.test.tsx index 72e226c93e1..a99e2c3f82e 100644 --- a/app/src/pages/ODD/ProtocolDetails/__tests__/Deck.test.tsx +++ b/app/src/pages/ODD/ProtocolDetails/__tests__/Deck.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/ProtocolDetails/__tests__/EmptySection.test.tsx b/app/src/pages/ODD/ProtocolDetails/__tests__/EmptySection.test.tsx index e188187de95..32b388ef1f3 100644 --- a/app/src/pages/ODD/ProtocolDetails/__tests__/EmptySection.test.tsx +++ b/app/src/pages/ODD/ProtocolDetails/__tests__/EmptySection.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/pages/ODD/ProtocolDetails/__tests__/Hardware.test.tsx b/app/src/pages/ODD/ProtocolDetails/__tests__/Hardware.test.tsx index a7458f38611..9ad2d010ece 100644 --- a/app/src/pages/ODD/ProtocolDetails/__tests__/Hardware.test.tsx +++ b/app/src/pages/ODD/ProtocolDetails/__tests__/Hardware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/ProtocolDetails/__tests__/Labware.test.tsx b/app/src/pages/ODD/ProtocolDetails/__tests__/Labware.test.tsx index 98506a8d1e4..0308559048f 100644 --- a/app/src/pages/ODD/ProtocolDetails/__tests__/Labware.test.tsx +++ b/app/src/pages/ODD/ProtocolDetails/__tests__/Labware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/pages/ODD/ProtocolDetails/__tests__/Liquids.test.tsx b/app/src/pages/ODD/ProtocolDetails/__tests__/Liquids.test.tsx index bfdbd6d74c2..be019dd6cf1 100644 --- a/app/src/pages/ODD/ProtocolDetails/__tests__/Liquids.test.tsx +++ b/app/src/pages/ODD/ProtocolDetails/__tests__/Liquids.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach } from 'vitest' import { when } from 'vitest-when' import { screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ProtocolDetails/__tests__/Parameters.test.tsx b/app/src/pages/ODD/ProtocolDetails/__tests__/Parameters.test.tsx index 3332f0a1746..bc805733d25 100644 --- a/app/src/pages/ODD/ProtocolDetails/__tests__/Parameters.test.tsx +++ b/app/src/pages/ODD/ProtocolDetails/__tests__/Parameters.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { it, describe, beforeEach, vi } from 'vitest' import { screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ProtocolDetails/__tests__/ProtocolDetails.test.tsx b/app/src/pages/ODD/ProtocolDetails/__tests__/ProtocolDetails.test.tsx index 3d37ec354b9..6a51ce910e9 100644 --- a/app/src/pages/ODD/ProtocolDetails/__tests__/ProtocolDetails.test.tsx +++ b/app/src/pages/ODD/ProtocolDetails/__tests__/ProtocolDetails.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { fireEvent, screen, waitFor } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/ProtocolDetails/index.tsx b/app/src/pages/ODD/ProtocolDetails/index.tsx index 6f3cf21677f..d75e0aea198 100644 --- a/app/src/pages/ODD/ProtocolDetails/index.tsx +++ b/app/src/pages/ODD/ProtocolDetails/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useRef } from 'react' import last from 'lodash/last' import { useTranslation } from 'react-i18next' import { useQueryClient } from 'react-query' @@ -79,8 +79,8 @@ const ProtocolHeader = ({ }: ProtocolHeaderProps): JSX.Element => { const navigate = useNavigate() const { t } = useTranslation(['protocol_info, protocol_details', 'shared']) - const [truncate, setTruncate] = React.useState(true) - const [startSetup, setStartSetup] = React.useState(false) + const [truncate, setTruncate] = useState(true) + const [startSetup, setStartSetup] = useState(false) const toggleTruncate = (): void => { setTruncate(value => !value) } @@ -320,13 +320,13 @@ export function ProtocolDetails(): JSX.Element | null { const navigate = useNavigate() const host = useHost() const { makeSnackbar } = useToaster() - const [showParameters, setShowParameters] = React.useState(false) + const [showParameters, setShowParameters] = useState(false) const queryClient = useQueryClient() - const [currentOption, setCurrentOption] = React.useState( + const [currentOption, setCurrentOption] = useState( protocolSectionTabOptions[0] ) - const [showMaxPinsAlert, setShowMaxPinsAlert] = React.useState(false) + const [showMaxPinsAlert, setShowMaxPinsAlert] = useState(false) const { data: protocolRecord, isLoading: isProtocolFetching, @@ -335,8 +335,8 @@ export function ProtocolDetails(): JSX.Element | null { }) // Watch for scrolling to toggle dropshadow - const scrollRef = React.useRef(null) - const [isScrolled, setIsScrolled] = React.useState(false) + const scrollRef = useRef(null) + const [isScrolled, setIsScrolled] = useState(false) const observer = new IntersectionObserver(([entry]) => { setIsScrolled(!entry.isIntersecting) }) @@ -410,7 +410,7 @@ export function ProtocolDetails(): JSX.Element | null { const [ showConfirmDeleteProtocol, setShowConfirmationDeleteProtocol, - ] = React.useState(false) + ] = useState(false) const handleDeleteClick = (): void => { setShowConfirmationDeleteProtocol(false) diff --git a/app/src/pages/ODD/ProtocolSetup/Buttons.tsx b/app/src/pages/ODD/ProtocolSetup/Buttons.tsx index af7417a433c..23882f70380 100644 --- a/app/src/pages/ODD/ProtocolSetup/Buttons.tsx +++ b/app/src/pages/ODD/ProtocolSetup/Buttons.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { diff --git a/app/src/pages/ODD/ProtocolSetup/ConfirmAttachedModal.tsx b/app/src/pages/ODD/ProtocolSetup/ConfirmAttachedModal.tsx index 5657ce7ae36..e3ddeae0f5f 100644 --- a/app/src/pages/ODD/ProtocolSetup/ConfirmAttachedModal.tsx +++ b/app/src/pages/ODD/ProtocolSetup/ConfirmAttachedModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/pages/ODD/ProtocolSetup/ConfirmSetupStepsCompleteModal.tsx b/app/src/pages/ODD/ProtocolSetup/ConfirmSetupStepsCompleteModal.tsx index 9c8c37697a5..eafffd9a8f0 100644 --- a/app/src/pages/ODD/ProtocolSetup/ConfirmSetupStepsCompleteModal.tsx +++ b/app/src/pages/ODD/ProtocolSetup/ConfirmSetupStepsCompleteModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/pages/ODD/ProtocolSetup/__tests__/ConfirmAttachedModal.test.tsx b/app/src/pages/ODD/ProtocolSetup/__tests__/ConfirmAttachedModal.test.tsx index b573449b529..f06e36df20d 100644 --- a/app/src/pages/ODD/ProtocolSetup/__tests__/ConfirmAttachedModal.test.tsx +++ b/app/src/pages/ODD/ProtocolSetup/__tests__/ConfirmAttachedModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/ProtocolSetup/__tests__/ProtocolSetup.test.tsx b/app/src/pages/ODD/ProtocolSetup/__tests__/ProtocolSetup.test.tsx index b218b05fc54..96f39a280f9 100644 --- a/app/src/pages/ODD/ProtocolSetup/__tests__/ProtocolSetup.test.tsx +++ b/app/src/pages/ODD/ProtocolSetup/__tests__/ProtocolSetup.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Route, MemoryRouter, Routes } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/QuickTransferDashboard/DeleteTransferConfirmationModal.tsx b/app/src/pages/ODD/QuickTransferDashboard/DeleteTransferConfirmationModal.tsx index b9d41644456..c037f254bb2 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/DeleteTransferConfirmationModal.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/DeleteTransferConfirmationModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { useQueryClient } from 'react-query' import { Trans, useTranslation } from 'react-i18next' @@ -33,7 +33,7 @@ export function DeleteTransferConfirmationModal({ const { i18n, t } = useTranslation(['quick_transfer', 'shared']) const navigate = useNavigate() const { makeSnackbar } = useToaster() - const [showIcon, setShowIcon] = React.useState(false) + const [showIcon, setShowIcon] = useState(false) const modalHeader: OddModalHeaderBaseProps = { title: t('delete_this_transfer'), iconName: 'ot-alert', diff --git a/app/src/pages/ODD/QuickTransferDashboard/IntroductoryModal.tsx b/app/src/pages/ODD/QuickTransferDashboard/IntroductoryModal.tsx index 230cb07bca3..8a02066d109 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/IntroductoryModal.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/IntroductoryModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { SPACING, diff --git a/app/src/pages/ODD/QuickTransferDashboard/LongPressModal.tsx b/app/src/pages/ODD/QuickTransferDashboard/LongPressModal.tsx index a7b9401f968..854ee2dfc98 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/LongPressModal.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/LongPressModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' @@ -41,7 +41,7 @@ export function LongPressModal({ const pinned = pinnedQuickTransferIds.includes(transferId) - const [showMaxPinsAlert, setShowMaxPinsAlert] = React.useState(false) + const [showMaxPinsAlert, setShowMaxPinsAlert] = useState(false) const { createRun } = useCreateRunMutation({ onSuccess: data => { diff --git a/app/src/pages/ODD/QuickTransferDashboard/NoQuickTransfers.tsx b/app/src/pages/ODD/QuickTransferDashboard/NoQuickTransfers.tsx index 5848967fc71..562f34920aa 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/NoQuickTransfers.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/NoQuickTransfers.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { diff --git a/app/src/pages/ODD/QuickTransferDashboard/PinnedTransferCarousel.tsx b/app/src/pages/ODD/QuickTransferDashboard/PinnedTransferCarousel.tsx index 96e197000e3..8b6554c3aa1 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/PinnedTransferCarousel.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/PinnedTransferCarousel.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled from 'styled-components' import { ALIGN_FLEX_START, diff --git a/app/src/pages/ODD/QuickTransferDashboard/PipetteNotAttachedErrorModal.tsx b/app/src/pages/ODD/QuickTransferDashboard/PipetteNotAttachedErrorModal.tsx index 4f26ca7bfb1..4631259bb3b 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/PipetteNotAttachedErrorModal.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/PipetteNotAttachedErrorModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { SPACING, diff --git a/app/src/pages/ODD/QuickTransferDashboard/StorageLimitReachedErrorModal.tsx b/app/src/pages/ODD/QuickTransferDashboard/StorageLimitReachedErrorModal.tsx index 2330489cdb7..0fe3d10d6d6 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/StorageLimitReachedErrorModal.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/StorageLimitReachedErrorModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { SPACING, diff --git a/app/src/pages/ODD/QuickTransferDashboard/__tests__/DeleteTransferConfirmationModal.test.tsx b/app/src/pages/ODD/QuickTransferDashboard/__tests__/DeleteTransferConfirmationModal.test.tsx index 7e8fb028696..1b42a6a5e3e 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/__tests__/DeleteTransferConfirmationModal.test.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/__tests__/DeleteTransferConfirmationModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { act, fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/QuickTransferDashboard/__tests__/LongPressModal.test.tsx b/app/src/pages/ODD/QuickTransferDashboard/__tests__/LongPressModal.test.tsx index cea0e3e0174..2c55020d32a 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/__tests__/LongPressModal.test.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/__tests__/LongPressModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/QuickTransferDashboard/__tests__/NoQuickTransfers.test.tsx b/app/src/pages/ODD/QuickTransferDashboard/__tests__/NoQuickTransfers.test.tsx index 2112ad6a6ee..6aa0af00838 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/__tests__/NoQuickTransfers.test.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/__tests__/NoQuickTransfers.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect } from 'vitest' import { renderWithProviders } from '/app/__testing-utils__' import { i18n } from '/app/i18n' diff --git a/app/src/pages/ODD/QuickTransferDashboard/__tests__/PinnedTransfer.test.tsx b/app/src/pages/ODD/QuickTransferDashboard/__tests__/PinnedTransfer.test.tsx index df11b68ea1a..5a473daf4b6 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/__tests__/PinnedTransfer.test.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/__tests__/PinnedTransfer.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect } from 'vitest' import { act, fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/QuickTransferDashboard/__tests__/QuickTransferCard.test.tsx b/app/src/pages/ODD/QuickTransferDashboard/__tests__/QuickTransferCard.test.tsx index 172817c7d74..2ecb7a1363a 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/__tests__/QuickTransferCard.test.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/__tests__/QuickTransferCard.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { act, fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/QuickTransferDashboard/index.tsx b/app/src/pages/ODD/QuickTransferDashboard/index.tsx index eb4a385079c..7d650ba3b72 100644 --- a/app/src/pages/ODD/QuickTransferDashboard/index.tsx +++ b/app/src/pages/ODD/QuickTransferDashboard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useNavigate } from 'react-router-dom' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -54,29 +54,28 @@ export function QuickTransferDashboard(): JSX.Element { const navigate = useNavigate() const { t } = useTranslation(['quick_transfer', 'protocol_info']) const dispatch = useDispatch() - const [navMenuIsOpened, setNavMenuIsOpened] = React.useState(false) - const [ - longPressModalIsOpened, - setLongPressModalOpened, - ] = React.useState(false) + const [navMenuIsOpened, setNavMenuIsOpened] = useState(false) + const [longPressModalIsOpened, setLongPressModalOpened] = useState( + false + ) const [ showDeleteConfirmationModal, setShowDeleteConfirmationModal, - ] = React.useState(false) + ] = useState(false) const [ showPipetteNotAttachedModal, setShowPipetteNotAttaachedModal, - ] = React.useState(false) + ] = useState(false) const [ showStorageLimitReachedModal, setShowStorageLimitReachedModal, - ] = React.useState(false) - const [targetTransferId, setTargetTransferId] = React.useState('') + ] = useState(false) + const [targetTransferId, setTargetTransferId] = useState('') const sortBy = useSelector(getQuickTransfersOnDeviceSortKey) ?? 'alphabetical' const hasDismissedIntro = useSelector(getHasDismissedQuickTransferIntro) const { trackEventWithRobotSerial } = useTrackEventWithRobotSerial() - React.useEffect(() => { + useEffect(() => { trackEventWithRobotSerial({ name: ANALYTICS_QUICK_TRANSFER_TAB_SELECTED, properties: {}, diff --git a/app/src/pages/ODD/QuickTransferDetails/Deck.tsx b/app/src/pages/ODD/QuickTransferDetails/Deck.tsx index f8d642899f0..3393b838f37 100644 --- a/app/src/pages/ODD/QuickTransferDetails/Deck.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/Deck.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import last from 'lodash/last' import { Flex, ProtocolDeck, SPACING } from '@opentrons/components' diff --git a/app/src/pages/ODD/QuickTransferDetails/Hardware.tsx b/app/src/pages/ODD/QuickTransferDetails/Hardware.tsx index b147bbc7b66..4e91938b92f 100644 --- a/app/src/pages/ODD/QuickTransferDetails/Hardware.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/Hardware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/app/src/pages/ODD/QuickTransferDetails/Labware.tsx b/app/src/pages/ODD/QuickTransferDetails/Labware.tsx index 1b0e3806655..c0f497d624a 100644 --- a/app/src/pages/ODD/QuickTransferDetails/Labware.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/Labware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/app/src/pages/ODD/QuickTransferDetails/__tests__/Deck.test.tsx b/app/src/pages/ODD/QuickTransferDetails/__tests__/Deck.test.tsx index dbdf7b2b4fe..e15296037d5 100644 --- a/app/src/pages/ODD/QuickTransferDetails/__tests__/Deck.test.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/__tests__/Deck.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/QuickTransferDetails/__tests__/Hardware.test.tsx b/app/src/pages/ODD/QuickTransferDetails/__tests__/Hardware.test.tsx index 80db6ec64b5..2287534a1a4 100644 --- a/app/src/pages/ODD/QuickTransferDetails/__tests__/Hardware.test.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/__tests__/Hardware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach, afterEach } from 'vitest' import { screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/QuickTransferDetails/__tests__/Labware.test.tsx b/app/src/pages/ODD/QuickTransferDetails/__tests__/Labware.test.tsx index 5d4bab9d08d..00248a410a5 100644 --- a/app/src/pages/ODD/QuickTransferDetails/__tests__/Labware.test.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/__tests__/Labware.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { renderWithProviders } from '/app/__testing-utils__' diff --git a/app/src/pages/ODD/QuickTransferDetails/__tests__/QuickTransferDetails.test.tsx b/app/src/pages/ODD/QuickTransferDetails/__tests__/QuickTransferDetails.test.tsx index 5a915e456d5..9d1848ee31e 100644 --- a/app/src/pages/ODD/QuickTransferDetails/__tests__/QuickTransferDetails.test.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/__tests__/QuickTransferDetails.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/QuickTransferDetails/index.tsx b/app/src/pages/ODD/QuickTransferDetails/index.tsx index cdabc93ea09..7095fd47ddb 100644 --- a/app/src/pages/ODD/QuickTransferDetails/index.tsx +++ b/app/src/pages/ODD/QuickTransferDetails/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect, useRef } from 'react' import last from 'lodash/last' import { useTranslation } from 'react-i18next' import { useQueryClient } from 'react-query' @@ -80,8 +80,8 @@ const QuickTransferHeader = ({ const navigate = useNavigate() const { trackEventWithRobotSerial } = useTrackEventWithRobotSerial() const { t } = useTranslation('protocol_details') - const [truncate, setTruncate] = React.useState(true) - const [startSetup, setStartSetup] = React.useState(false) + const [truncate, setTruncate] = useState(true) + const [startSetup, setStartSetup] = useState(false) const toggleTruncate = (): void => { setTruncate(value => !value) } @@ -91,7 +91,7 @@ const QuickTransferHeader = ({ displayedTitle = truncateString(displayedTitle, 80, 60) } - React.useEffect(() => { + useEffect(() => { trackEventWithRobotSerial({ name: ANALYTICS_QUICK_TRANSFER_DETAILS_PAGE, properties: { @@ -308,11 +308,11 @@ export function QuickTransferDetails(): JSX.Element | null { const host = useHost() const { makeSnackbar } = useToaster() const queryClient = useQueryClient() - const [currentOption, setCurrentOption] = React.useState( + const [currentOption, setCurrentOption] = useState( transferSectionTabOptions[0] ) - const [showMaxPinsAlert, setShowMaxPinsAlert] = React.useState(false) + const [showMaxPinsAlert, setShowMaxPinsAlert] = useState(false) const { data: protocolRecord, isLoading: isTransferFetching, @@ -321,8 +321,8 @@ export function QuickTransferDetails(): JSX.Element | null { }) // Watch for scrolling to toggle dropshadow - const scrollRef = React.useRef(null) - const [isScrolled, setIsScrolled] = React.useState(false) + const scrollRef = useRef(null) + const [isScrolled, setIsScrolled] = useState(false) const observer = new IntersectionObserver(([entry]) => { setIsScrolled(!entry.isIntersecting) }) @@ -384,7 +384,7 @@ export function QuickTransferDetails(): JSX.Element | null { const [ showConfirmDeleteTransfer, setShowConfirmationDeleteTransfer, - ] = React.useState(false) + ] = useState(false) const displayName = !isTransferFetching && protocolRecord != null diff --git a/app/src/pages/ODD/RobotDashboard/WelcomeModal.tsx b/app/src/pages/ODD/RobotDashboard/WelcomeModal.tsx index 658c9f99fc0..99c1ff41b21 100644 --- a/app/src/pages/ODD/RobotDashboard/WelcomeModal.tsx +++ b/app/src/pages/ODD/RobotDashboard/WelcomeModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useTranslation } from 'react-i18next' import { @@ -47,7 +47,7 @@ export function WelcomeModal({ setShowWelcomeModal(false) } - React.useEffect(startDiscoAnimation, []) + useEffect(startDiscoAnimation, []) return ( diff --git a/app/src/pages/ODD/RobotDashboard/__tests__/RobotDashboard.test.tsx b/app/src/pages/ODD/RobotDashboard/__tests__/RobotDashboard.test.tsx index d15b618b3e2..84eb834e1a3 100644 --- a/app/src/pages/ODD/RobotDashboard/__tests__/RobotDashboard.test.tsx +++ b/app/src/pages/ODD/RobotDashboard/__tests__/RobotDashboard.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/RobotDashboard/__tests__/WelcomeModal.test.tsx b/app/src/pages/ODD/RobotDashboard/__tests__/WelcomeModal.test.tsx index 5f0d1b49b27..9d9f59d75b5 100644 --- a/app/src/pages/ODD/RobotDashboard/__tests__/WelcomeModal.test.tsx +++ b/app/src/pages/ODD/RobotDashboard/__tests__/WelcomeModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, describe, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/RobotDashboard/index.tsx b/app/src/pages/ODD/RobotDashboard/index.tsx index d9598a2c046..3b4414aaceb 100644 --- a/app/src/pages/ODD/RobotDashboard/index.tsx +++ b/app/src/pages/ODD/RobotDashboard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -36,7 +36,7 @@ export function RobotDashboard(): JSX.Element { const { unfinishedUnboxingFlowRoute } = useSelector( getOnDeviceDisplaySettings ) - const [showWelcomeModal, setShowWelcomeModal] = React.useState( + const [showWelcomeModal, setShowWelcomeModal] = useState( unfinishedUnboxingFlowRoute !== null ) diff --git a/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx b/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx index d63e4750ac5..4787c63909a 100644 --- a/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx +++ b/app/src/pages/ODD/RobotSettingsDashboard/RobotSettingsList.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' diff --git a/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx b/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx index aa98d8b5c25..980a884c3a5 100644 --- a/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx +++ b/app/src/pages/ODD/RobotSettingsDashboard/__tests__/RobotSettingsDashboard.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/RobotSettingsDashboard/index.tsx b/app/src/pages/ODD/RobotSettingsDashboard/index.tsx index b04467ffa47..30925f1ae44 100644 --- a/app/src/pages/ODD/RobotSettingsDashboard/index.tsx +++ b/app/src/pages/ODD/RobotSettingsDashboard/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import last from 'lodash/last' @@ -66,12 +66,11 @@ export function RobotSettingsDashboard(): JSX.Element { ?.securityType // LOCAL STATE MANAGEMENT for wi-fi user input - const [selectedSsid, setSelectedSsid] = React.useState('') - const [ - selectedAuthType, - setSelectedAuthType, - ] = React.useState('wpa-psk') - const [password, setPassword] = React.useState('') + const [selectedSsid, setSelectedSsid] = useState('') + const [selectedAuthType, setSelectedAuthType] = useState( + 'wpa-psk' + ) + const [password, setPassword] = useState('') // REQUESTS const dispatch = useDispatch() @@ -93,15 +92,12 @@ export function RobotSettingsDashboard(): JSX.Element { setPassword('') } - React.useEffect(() => { + useEffect(() => { dispatch(fetchStatus(robotName)) }, [robotName, dispatch]) // PAGE-LEVEL SWITCH MANAGEMENT - const [ - currentOption, - setCurrentOption, - ] = React.useState(null) + const [currentOption, setCurrentOption] = useState(null) switch (currentOption) { case 'RobotName': diff --git a/app/src/pages/ODD/RunSummary/index.tsx b/app/src/pages/ODD/RunSummary/index.tsx index 90b6368fd4a..abc565ce88b 100644 --- a/app/src/pages/ODD/RunSummary/index.tsx +++ b/app/src/pages/ODD/RunSummary/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useSelector } from 'react-redux' import { useParams, useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' @@ -114,7 +114,7 @@ export function RunSummary(): JSX.Element { ? onDeviceDisplayFormatTimestamp(completedAt) : EMPTY_TIMESTAMP - const [showSplash, setShowSplash] = React.useState( + const [showSplash, setShowSplash] = useState( runStatus === RUN_STATUS_FAILED || runStatus === RUN_STATUS_SUCCEEDED ) const localRobot = useSelector(getLocalRobot) @@ -134,7 +134,7 @@ export function RunSummary(): JSX.Element { const { reportRecoveredRunResult } = useRecoveryAnalytics() const enteredER = runRecord?.data.hasEverEnteredErrorRecovery ?? false - React.useEffect(() => { + useEffect(() => { if (isRunCurrent && typeof enteredER === 'boolean') { reportRecoveredRunResult(runStatus, enteredER) } @@ -158,15 +158,9 @@ export function RunSummary(): JSX.Element { onSuccess?.() } } - const [showRunFailedModal, setShowRunFailedModal] = React.useState( - false - ) - const [showRunAgainSpinner, setShowRunAgainSpinner] = React.useState( - false - ) - const [showReturnToSpinner, setShowReturnToSpinner] = React.useState( - false - ) + const [showRunFailedModal, setShowRunFailedModal] = useState(false) + const [showRunAgainSpinner, setShowRunAgainSpinner] = useState(false) + const [showReturnToSpinner, setShowReturnToSpinner] = useState(false) const robotSerialNumber = localRobot?.health?.robot_serial ?? @@ -244,7 +238,7 @@ export function RunSummary(): JSX.Element { }) // Determine tip status on initial render only. Error Recovery always handles tip status, so don't show it twice. - React.useEffect(() => { + useEffect(() => { if (isRunCurrent && enteredER === false) { void determineTipStatus() } diff --git a/app/src/pages/ODD/RunningProtocol/__tests__/RunningProtocol.test.tsx b/app/src/pages/ODD/RunningProtocol/__tests__/RunningProtocol.test.tsx index 66fc830f9e2..56e9d82e363 100644 --- a/app/src/pages/ODD/RunningProtocol/__tests__/RunningProtocol.test.tsx +++ b/app/src/pages/ODD/RunningProtocol/__tests__/RunningProtocol.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Route, MemoryRouter, Routes } from 'react-router-dom' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/RunningProtocol/index.tsx b/app/src/pages/ODD/RunningProtocol/index.tsx index 790968ba6c4..35058ebb063 100644 --- a/app/src/pages/ODD/RunningProtocol/index.tsx +++ b/app/src/pages/ODD/RunningProtocol/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useRef, useEffect } from 'react' import { useParams } from 'react-router-dom' import styled, { css } from 'styled-components' import { useSelector } from 'react-redux' @@ -84,14 +84,14 @@ export function RunningProtocol(): JSX.Element { const { runId } = useParams< keyof OnDeviceRouteParams >() as OnDeviceRouteParams - const [currentOption, setCurrentOption] = React.useState( + const [currentOption, setCurrentOption] = useState( 'CurrentRunningProtocolCommand' ) const [ showConfirmCancelRunModal, setShowConfirmCancelRunModal, - ] = React.useState(false) - const lastAnimatedCommand = React.useRef(null) + ] = useState(false) + const lastAnimatedCommand = useRef(null) const { ref, style, swipeType, setSwipeType } = useSwipe() const robotSideAnalysis = useMostRecentCompletedAnalysis(runId) const lastRunCommand = useLastRunCommand(runId, { @@ -133,7 +133,7 @@ export function RunningProtocol(): JSX.Element { analysis: robotSideAnalysis, }) - React.useEffect(() => { + useEffect(() => { if ( currentOption === 'CurrentRunningProtocolCommand' && swipeType === 'swipe-left' diff --git a/app/src/pages/ODD/UpdateRobot/UpdateRobot.tsx b/app/src/pages/ODD/UpdateRobot/UpdateRobot.tsx index 5b2b32c69cc..b999863bfc2 100644 --- a/app/src/pages/ODD/UpdateRobot/UpdateRobot.tsx +++ b/app/src/pages/ODD/UpdateRobot/UpdateRobot.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector, useDispatch } from 'react-redux' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' @@ -35,7 +35,7 @@ export function UpdateRobot(): JSX.Element { const dispatchStartRobotUpdate = useDispatchStartRobotUpdate() const dispatch = useDispatch() - const [errorString, setErrorString] = React.useState(null) + const [errorString, setErrorString] = useState(null) return ( diff --git a/app/src/pages/ODD/UpdateRobot/UpdateRobotDuringOnboarding.tsx b/app/src/pages/ODD/UpdateRobot/UpdateRobotDuringOnboarding.tsx index 9755336617e..3f15fec7386 100644 --- a/app/src/pages/ODD/UpdateRobot/UpdateRobotDuringOnboarding.tsx +++ b/app/src/pages/ODD/UpdateRobot/UpdateRobotDuringOnboarding.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' @@ -30,10 +30,9 @@ import type { Dispatch, State } from '/app/redux/types' const CHECK_UPDATES_DURATION = 10000 // Note: kj 1/10/2023 Currently set 10 sec later we may use a status from state export function UpdateRobotDuringOnboarding(): JSX.Element { - const [ - isShowCheckingUpdates, - setIsShowCheckingUpdates, - ] = React.useState(true) + const [isShowCheckingUpdates, setIsShowCheckingUpdates] = useState( + true + ) const navigate = useNavigate() const { i18n, t } = useTranslation(['device_settings', 'shared']) const dispatchStartRobotUpdate = useDispatchStartRobotUpdate() @@ -50,7 +49,7 @@ export function UpdateRobotDuringOnboarding(): JSX.Element { getOnDeviceDisplaySettings ) - React.useEffect(() => { + useEffect(() => { if (robotUpdateType !== 'upgrade') { const checkUpdateTimer = setTimeout(() => { setIsShowCheckingUpdates(false) @@ -63,7 +62,7 @@ export function UpdateRobotDuringOnboarding(): JSX.Element { } }, []) - const [errorString, setErrorString] = React.useState(null) + const [errorString, setErrorString] = useState(null) const handleSuccessfulUpdate = (): void => { if (unfinishedUnboxingFlowRoute === '/welcome') { dispatch( diff --git a/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobot.test.tsx b/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobot.test.tsx index 89d0ce8e855..6ca9292305d 100644 --- a/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobot.test.tsx +++ b/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobot.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, beforeEach, afterEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { when } from 'vitest-when' diff --git a/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobotDuringOnboarding.test.tsx b/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobotDuringOnboarding.test.tsx index 99bf8040a0b..97ba051f2c0 100644 --- a/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobotDuringOnboarding.test.tsx +++ b/app/src/pages/ODD/UpdateRobot/__tests__/UpdateRobotDuringOnboarding.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect, beforeEach, afterEach } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { act, screen } from '@testing-library/react' diff --git a/app/src/pages/ODD/Welcome/__tests__/Welcome.test.tsx b/app/src/pages/ODD/Welcome/__tests__/Welcome.test.tsx index c176a840347..1daabbb7504 100644 --- a/app/src/pages/ODD/Welcome/__tests__/Welcome.test.tsx +++ b/app/src/pages/ODD/Welcome/__tests__/Welcome.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, it, describe, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/app/src/pages/ODD/Welcome/index.tsx b/app/src/pages/ODD/Welcome/index.tsx index 48642c7264b..e7b320b5239 100644 --- a/app/src/pages/ODD/Welcome/index.tsx +++ b/app/src/pages/ODD/Welcome/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { diff --git a/app/src/redux-resources/analytics/hooks/__tests__/useProtocolRunAnalyticsData.test.tsx b/app/src/redux-resources/analytics/hooks/__tests__/useProtocolRunAnalyticsData.test.tsx index 334918e19c8..b99b66c8816 100644 --- a/app/src/redux-resources/analytics/hooks/__tests__/useProtocolRunAnalyticsData.test.tsx +++ b/app/src/redux-resources/analytics/hooks/__tests__/useProtocolRunAnalyticsData.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { renderHook, waitFor } from '@testing-library/react' diff --git a/app/src/redux-resources/analytics/hooks/__tests__/useRobotAnalyticsData.test.tsx b/app/src/redux-resources/analytics/hooks/__tests__/useRobotAnalyticsData.test.tsx index 38eec3be788..a781d71c495 100644 --- a/app/src/redux-resources/analytics/hooks/__tests__/useRobotAnalyticsData.test.tsx +++ b/app/src/redux-resources/analytics/hooks/__tests__/useRobotAnalyticsData.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { renderHook } from '@testing-library/react' diff --git a/app/src/redux-resources/analytics/hooks/__tests__/useTrackProtocolRunEvent.test.tsx b/app/src/redux-resources/analytics/hooks/__tests__/useTrackProtocolRunEvent.test.tsx index 14d3e47f73b..3172c8d1fbc 100644 --- a/app/src/redux-resources/analytics/hooks/__tests__/useTrackProtocolRunEvent.test.tsx +++ b/app/src/redux-resources/analytics/hooks/__tests__/useTrackProtocolRunEvent.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createStore } from 'redux' import { Provider } from 'react-redux' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/redux-resources/analytics/hooks/useRobotAnalyticsData.ts b/app/src/redux-resources/analytics/hooks/useRobotAnalyticsData.ts index bfedb714eb3..809f1cb8c6f 100644 --- a/app/src/redux-resources/analytics/hooks/useRobotAnalyticsData.ts +++ b/app/src/redux-resources/analytics/hooks/useRobotAnalyticsData.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect, useMemo } from 'react' import { useSelector, useDispatch } from 'react-redux' import { useRobot } from '/app/redux-resources/robots' @@ -35,12 +35,12 @@ export function useRobotAnalyticsData( robot?.status != null ? getRobotSerialNumber(robot) : null const dispatch = useDispatch() - React.useEffect(() => { + useEffect(() => { dispatch(fetchSettings(robotName)) }, [dispatch, robotName]) // @ts-expect-error RobotAnalyticsData type needs boolean values should it be boolean | string - return React.useMemo(() => { + return useMemo(() => { if (robot != null) { return settings.reduce( (result, setting) => ({ diff --git a/app/src/redux-resources/robots/hooks/__tests__/useIsFlex.test.tsx b/app/src/redux-resources/robots/hooks/__tests__/useIsFlex.test.tsx index 88768843e19..acb68840dfe 100644 --- a/app/src/redux-resources/robots/hooks/__tests__/useIsFlex.test.tsx +++ b/app/src/redux-resources/robots/hooks/__tests__/useIsFlex.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { Provider } from 'react-redux' diff --git a/app/src/redux-resources/robots/hooks/__tests__/useRobot.test.tsx b/app/src/redux-resources/robots/hooks/__tests__/useRobot.test.tsx index 11e0a5c93af..df7e05347dd 100644 --- a/app/src/redux-resources/robots/hooks/__tests__/useRobot.test.tsx +++ b/app/src/redux-resources/robots/hooks/__tests__/useRobot.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { Provider } from 'react-redux' diff --git a/app/src/redux/robot-update/__tests__/hooks.test.tsx b/app/src/redux/robot-update/__tests__/hooks.test.tsx index d4f0101b754..7528bf290bc 100644 --- a/app/src/redux/robot-update/__tests__/hooks.test.tsx +++ b/app/src/redux/robot-update/__tests__/hooks.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { createStore } from 'redux' import { renderHook } from '@testing-library/react' diff --git a/app/src/resources/analysis/hooks/__tests__/useStoredProtocolAnalysis.test.tsx b/app/src/resources/analysis/hooks/__tests__/useStoredProtocolAnalysis.test.tsx index 51b1f00c441..2437ed6e1a7 100644 --- a/app/src/resources/analysis/hooks/__tests__/useStoredProtocolAnalysis.test.tsx +++ b/app/src/resources/analysis/hooks/__tests__/useStoredProtocolAnalysis.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/resources/calibration/__tests__/useDeckCalibrationStatus.test.tsx b/app/src/resources/calibration/__tests__/useDeckCalibrationStatus.test.tsx index f80178a7b37..768c4152ff2 100644 --- a/app/src/resources/calibration/__tests__/useDeckCalibrationStatus.test.tsx +++ b/app/src/resources/calibration/__tests__/useDeckCalibrationStatus.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { Provider } from 'react-redux' diff --git a/app/src/resources/health/hooks.ts b/app/src/resources/health/hooks.ts index 52f522d2436..43a5894266d 100644 --- a/app/src/resources/health/hooks.ts +++ b/app/src/resources/health/hooks.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { useHealthQuery } from '@opentrons/react-api-client' @@ -15,7 +15,7 @@ export type RobotInitializationStatus = | null export function useRobotInitializationStatus(): RobotInitializationStatus { - const responseStatusCode = React.useRef(null) + const responseStatusCode = useRef(null) useHealthQuery({ refetchInterval: ROBOT_HEALTH_POLL_MS, diff --git a/app/src/resources/instruments/__tests__/useAttachedPipetteCalibrations.test.tsx b/app/src/resources/instruments/__tests__/useAttachedPipetteCalibrations.test.tsx index 197f65bf92b..ef5309a52d5 100644 --- a/app/src/resources/instruments/__tests__/useAttachedPipetteCalibrations.test.tsx +++ b/app/src/resources/instruments/__tests__/useAttachedPipetteCalibrations.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { vi, it, expect, describe, beforeEach } from 'vitest' import { Provider } from 'react-redux' diff --git a/app/src/resources/maintenance_runs/hooks/useChainMaintenanceCommands.ts b/app/src/resources/maintenance_runs/hooks/useChainMaintenanceCommands.ts index 2f3a6e82434..53ebe3e894c 100644 --- a/app/src/resources/maintenance_runs/hooks/useChainMaintenanceCommands.ts +++ b/app/src/resources/maintenance_runs/hooks/useChainMaintenanceCommands.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useCreateMaintenanceCommandMutation } from '@opentrons/react-api-client' @@ -14,7 +14,7 @@ export function useChainMaintenanceCommands(): { ) => ReturnType isCommandMutationLoading: boolean } { - const [isLoading, setIsLoading] = React.useState(false) + const [isLoading, setIsLoading] = useState(false) const { createMaintenanceCommand } = useCreateMaintenanceCommandMutation() return { chainRunCommands: ( diff --git a/app/src/resources/maintenance_runs/hooks/useRobotControlCommands.ts b/app/src/resources/maintenance_runs/hooks/useRobotControlCommands.ts index 427fff40183..247f621b3b7 100644 --- a/app/src/resources/maintenance_runs/hooks/useRobotControlCommands.ts +++ b/app/src/resources/maintenance_runs/hooks/useRobotControlCommands.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDeleteMaintenanceRunMutation } from '@opentrons/react-api-client' @@ -40,7 +40,7 @@ export function useRobotControlCommands({ continuePastCommandFailure, onSettled, }: UseRobotControlCommandsProps): UseRobotControlCommandsResult { - const [isExecuting, setIsExecuting] = React.useState(false) + const [isExecuting, setIsExecuting] = useState(false) const { chainRunCommands } = useChainMaintenanceCommands() const { diff --git a/app/src/resources/networking/hooks/__tests__/useCanDisconnect.test.tsx b/app/src/resources/networking/hooks/__tests__/useCanDisconnect.test.tsx index 4897c98f2b5..3985dc36ca8 100644 --- a/app/src/resources/networking/hooks/__tests__/useCanDisconnect.test.tsx +++ b/app/src/resources/networking/hooks/__tests__/useCanDisconnect.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { describe, it, expect, vi, beforeEach } from 'vitest' import { createStore } from 'redux' diff --git a/app/src/resources/networking/hooks/__tests__/useNetworkConnection.test.tsx b/app/src/resources/networking/hooks/__tests__/useNetworkConnection.test.tsx index 7ea78ea446f..2c0e6257e42 100644 --- a/app/src/resources/networking/hooks/__tests__/useNetworkConnection.test.tsx +++ b/app/src/resources/networking/hooks/__tests__/useNetworkConnection.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/app/src/resources/protocols/hooks/__tests__/useProtocolMetadata.test.tsx b/app/src/resources/protocols/hooks/__tests__/useProtocolMetadata.test.tsx index 340b74815fb..48ced67d25f 100644 --- a/app/src/resources/protocols/hooks/__tests__/useProtocolMetadata.test.tsx +++ b/app/src/resources/protocols/hooks/__tests__/useProtocolMetadata.test.tsx @@ -1,5 +1,5 @@ // tests for the HostConfig context and hook -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { Provider } from 'react-redux' diff --git a/app/src/resources/robot-settings/useLEDLights.ts b/app/src/resources/robot-settings/useLEDLights.ts index 49e62cb31e8..9b6fa5d54ef 100644 --- a/app/src/resources/robot-settings/useLEDLights.ts +++ b/app/src/resources/robot-settings/useLEDLights.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { fetchSettings, @@ -15,9 +15,7 @@ export function useLEDLights( lightsEnabled: boolean toggleLights: () => void } { - const [lightsEnabledCache, setLightsEnabledCache] = React.useState( - true - ) + const [lightsEnabledCache, setLightsEnabledCache] = useState(true) const dispatch = useDispatch() @@ -26,11 +24,11 @@ export function useLEDLights( getRobotSettings(state, robotName) ).find(setting => setting.id === 'disableStatusBar')?.value !== true - React.useEffect(() => { + useEffect(() => { setLightsEnabledCache(isStatusBarEnabled) }, [isStatusBarEnabled]) - React.useEffect(() => { + useEffect(() => { dispatch(fetchSettings(robotName)) }, [dispatch, robotName]) diff --git a/app/src/resources/runs/__tests__/useCloneRun.test.tsx b/app/src/resources/runs/__tests__/useCloneRun.test.tsx index 585093605a7..9323bbf8073 100644 --- a/app/src/resources/runs/__tests__/useCloneRun.test.tsx +++ b/app/src/resources/runs/__tests__/useCloneRun.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { when } from 'vitest-when' import { renderHook } from '@testing-library/react' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/app/src/resources/runs/__tests__/useLPCDisabledReason.test.tsx b/app/src/resources/runs/__tests__/useLPCDisabledReason.test.tsx index 7e1af24915a..0be19bc19d3 100644 --- a/app/src/resources/runs/__tests__/useLPCDisabledReason.test.tsx +++ b/app/src/resources/runs/__tests__/useLPCDisabledReason.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { renderHook } from '@testing-library/react' import { Provider } from 'react-redux' import { I18nextProvider } from 'react-i18next' diff --git a/app/src/resources/runs/__tests__/useModuleCalibrationStatus.test.tsx b/app/src/resources/runs/__tests__/useModuleCalibrationStatus.test.tsx index 7f57b0807ed..5691230dbaf 100644 --- a/app/src/resources/runs/__tests__/useModuleCalibrationStatus.test.tsx +++ b/app/src/resources/runs/__tests__/useModuleCalibrationStatus.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook } from '@testing-library/react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' diff --git a/app/src/resources/runs/__tests__/useRunCalibrationStatus.test.tsx b/app/src/resources/runs/__tests__/useRunCalibrationStatus.test.tsx index f8df8d8edf0..d0a81ff3e50 100644 --- a/app/src/resources/runs/__tests__/useRunCalibrationStatus.test.tsx +++ b/app/src/resources/runs/__tests__/useRunCalibrationStatus.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook } from '@testing-library/react' import { vi, it, expect, describe, beforeEach } from 'vitest' diff --git a/app/src/resources/runs/hooks.ts b/app/src/resources/runs/hooks.ts index fd099985b28..c748ce12379 100644 --- a/app/src/resources/runs/hooks.ts +++ b/app/src/resources/runs/hooks.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { @@ -71,7 +71,7 @@ export function useChainRunCommands( ) => ReturnType isCommandMutationLoading: boolean } { - const [isLoading, setIsLoading] = React.useState(false) + const [isLoading, setIsLoading] = useState(false) const { createRunCommand } = useCreateRunCommandMutation( runId, @@ -99,7 +99,7 @@ export function useChainLiveCommands(): { ) => ReturnType isCommandMutationLoading: boolean } { - const [isLoading, setIsLoading] = React.useState(false) + const [isLoading, setIsLoading] = useState(false) const { createLiveCommand } = useCreateLiveCommandMutation() return { chainLiveCommands: ( diff --git a/app/src/resources/runs/useCloseCurrentRun.ts b/app/src/resources/runs/useCloseCurrentRun.ts index a95bf357ce5..583b04ba968 100644 --- a/app/src/resources/runs/useCloseCurrentRun.ts +++ b/app/src/resources/runs/useCloseCurrentRun.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useCallback } from 'react' import { useDismissCurrentRunMutation } from '@opentrons/react-api-client' import { useCurrentRunId } from '/app/resources/runs' @@ -31,7 +31,7 @@ export function useCloseCurrentRun(): { } } - const closeCurrentRunCallback = React.useCallback(closeCurrentRun, [ + const closeCurrentRunCallback = useCallback(closeCurrentRun, [ dismissCurrentRun, currentRunId, ]) diff --git a/app/src/resources/runs/useProtocolDetailsForRun.ts b/app/src/resources/runs/useProtocolDetailsForRun.ts index 8bc1c655350..452dd30824a 100644 --- a/app/src/resources/runs/useProtocolDetailsForRun.ts +++ b/app/src/resources/runs/useProtocolDetailsForRun.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import last from 'lodash/last' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' import { @@ -32,7 +32,7 @@ export function useProtocolDetailsForRun( const [ isPollingProtocolAnalyses, setIsPollingProtocolAnalyses, - ] = React.useState(true) + ] = useState(true) const { data: protocolRecord } = useProtocolQuery(protocolId, { staleTime: Infinity, @@ -46,7 +46,7 @@ export function useProtocolDetailsForRun( } ) - React.useEffect(() => { + useEffect(() => { if (mostRecentAnalysis?.status === 'completed') { setIsPollingProtocolAnalyses(false) } else { diff --git a/app/src/resources/runs/useRunStatus.ts b/app/src/resources/runs/useRunStatus.ts index 3953331b7d8..a1a1d5dc7cd 100644 --- a/app/src/resources/runs/useRunStatus.ts +++ b/app/src/resources/runs/useRunStatus.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { RUN_ACTION_TYPE_PLAY, RUN_STATUS_IDLE, @@ -15,7 +15,7 @@ export function useRunStatus( runId: string | null, options?: UseQueryOptions ): RunStatus | null { - const lastRunStatus = React.useRef(null) + const lastRunStatus = useRef(null) const { data } = useNotifyRunQuery(runId ?? null, { refetchInterval: DEFAULT_STATUS_REFETCH_INTERVAL, diff --git a/app/src/resources/useNotifyDataReady.ts b/app/src/resources/useNotifyDataReady.ts index 45fc79cccf1..b6aa1088b9c 100644 --- a/app/src/resources/useNotifyDataReady.ts +++ b/app/src/resources/useNotifyDataReady.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect, useCallback } from 'react' import { useDispatch } from 'react-redux' @@ -56,9 +56,9 @@ export function useNotifyDataReady({ const hostname = host?.hostname ?? null const doTrackEvent = useTrackEvent() const forcePollingFF = useFeatureFlag('forceHttpPolling') - const seenHostname = React.useRef(null) - const [refetch, setRefetch] = React.useState(null) - const [isNotifyEnabled, setIsNotifyEnabled] = React.useState(true) + const seenHostname = useRef(null) + const [refetch, setRefetch] = useState(null) + const [isNotifyEnabled, setIsNotifyEnabled] = useState(true) const { enabled, staleTime, forceHttpPolling } = options @@ -69,7 +69,7 @@ export function useNotifyDataReady({ staleTime !== Infinity && !forcePollingFF - React.useEffect(() => { + useEffect(() => { if (shouldUseNotifications) { // Always fetch on initial mount to keep latency as low as possible. setRefetch('once') @@ -96,7 +96,7 @@ export function useNotifyDataReady({ } }, [topic, hostname, shouldUseNotifications]) - const onDataEvent = React.useCallback((data: NotifyResponseData): void => { + const onDataEvent = useCallback((data: NotifyResponseData): void => { if (data === 'ECONNFAILED' || data === 'ECONNREFUSED') { setIsNotifyEnabled(false) if (data === 'ECONNREFUSED') { @@ -110,7 +110,7 @@ export function useNotifyDataReady({ } }, []) - const notifyOnSettled = React.useCallback( + const notifyOnSettled = useCallback( (data: TData | undefined, error: TError | null) => { if (refetch === 'once') { setRefetch(null) diff --git a/components/src/alerts/AlertItem.stories.tsx b/components/src/alerts/AlertItem.stories.tsx index 23607281b75..182fae8cec7 100644 --- a/components/src/alerts/AlertItem.stories.tsx +++ b/components/src/alerts/AlertItem.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { AlertItem } from './AlertItem' import type { Story, Meta } from '@storybook/react' diff --git a/components/src/alerts/AlertItem.tsx b/components/src/alerts/AlertItem.tsx index 34d8d03c730..708f44f746c 100644 --- a/components/src/alerts/AlertItem.tsx +++ b/components/src/alerts/AlertItem.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' import { IconButton } from '../buttons' diff --git a/components/src/atoms/Checkbox/__tests__/Checkbox.test.tsx b/components/src/atoms/Checkbox/__tests__/Checkbox.test.tsx index a51f1583a4a..cfee4c22835 100644 --- a/components/src/atoms/Checkbox/__tests__/Checkbox.test.tsx +++ b/components/src/atoms/Checkbox/__tests__/Checkbox.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, beforeEach, afterEach, vi, expect, it } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/atoms/Checkbox/index.tsx b/components/src/atoms/Checkbox/index.tsx index db8972d6dda..36547743821 100644 --- a/components/src/atoms/Checkbox/index.tsx +++ b/components/src/atoms/Checkbox/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { COLORS, BORDERS } from '../../helix-design-system' import { Flex } from '../../primitives' diff --git a/components/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx b/components/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx index 12778d0965f..06fc3153d9e 100644 --- a/components/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx +++ b/components/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, beforeEach, afterEach, vi, expect, it } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/atoms/CheckboxField/index.tsx b/components/src/atoms/CheckboxField/index.tsx index 08efd6796f6..9f02ef52bc0 100644 --- a/components/src/atoms/CheckboxField/index.tsx +++ b/components/src/atoms/CheckboxField/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { SPACING, TYPOGRAPHY } from '../../ui-style-constants' import { COLORS, BORDERS } from '../../helix-design-system' diff --git a/components/src/atoms/Chip/Chip.stories.tsx b/components/src/atoms/Chip/Chip.stories.tsx index 16dee3ba355..b6c6277da54 100644 --- a/components/src/atoms/Chip/Chip.stories.tsx +++ b/components/src/atoms/Chip/Chip.stories.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Flex } from '../../primitives' import { COLORS } from '../../helix-design-system' import { SPACING, VIEWPORT } from '../../ui-style-constants' diff --git a/components/src/atoms/Chip/__tests__/Chip.test.tsx b/components/src/atoms/Chip/__tests__/Chip.test.tsx index 293f7a1a4c4..65de215160f 100644 --- a/components/src/atoms/Chip/__tests__/Chip.test.tsx +++ b/components/src/atoms/Chip/__tests__/Chip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { BORDERS, COLORS } from '../../../helix-design-system' diff --git a/components/src/atoms/Chip/index.tsx b/components/src/atoms/Chip/index.tsx index f3bafa4187d..09bead78635 100644 --- a/components/src/atoms/Chip/index.tsx +++ b/components/src/atoms/Chip/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { BORDERS, COLORS } from '../../helix-design-system' import { Flex } from '../../primitives' diff --git a/components/src/atoms/Divider/index.tsx b/components/src/atoms/Divider/index.tsx index b1e8c158722..7de6a3757f4 100644 --- a/components/src/atoms/Divider/index.tsx +++ b/components/src/atoms/Divider/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box, COLORS, SPACING } from '../..' type Props = React.ComponentProps diff --git a/components/src/atoms/InputField/__tests__/InputField.test.tsx b/components/src/atoms/InputField/__tests__/InputField.test.tsx index 0bc6898b1b0..f53d4f4163a 100644 --- a/components/src/atoms/InputField/__tests__/InputField.test.tsx +++ b/components/src/atoms/InputField/__tests__/InputField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { screen, fireEvent } from '@testing-library/react' import { renderWithProviders } from '../../../testing/utils' diff --git a/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordion.tsx b/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordion.tsx index be5f2917a59..04c42ba654b 100644 --- a/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordion.tsx +++ b/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordion.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Flex } from '../../../primitives' import { DIRECTION_COLUMN } from '../../../styles' import { SPACING } from '../../../ui-style-constants' diff --git a/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.tsx b/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.tsx index fd966ca0feb..99fde7dd81f 100644 --- a/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.tsx +++ b/components/src/atoms/ListButton/ListButtonChildren/ListButtonAccordionContainer.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Flex } from '../../../primitives' import { DIRECTION_COLUMN } from '../../../styles' diff --git a/components/src/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.tsx b/components/src/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.tsx index 8114f598fe9..52a58e5f4ec 100644 --- a/components/src/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.tsx +++ b/components/src/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled, { css } from 'styled-components' import { SPACING } from '../../../ui-style-constants' import { BORDERS, COLORS } from '../../../helix-design-system' diff --git a/components/src/atoms/ListButton/__tests__/ListButton.test.tsx b/components/src/atoms/ListButton/__tests__/ListButton.test.tsx index 6af0feddaee..e7ba460b5e2 100644 --- a/components/src/atoms/ListButton/__tests__/ListButton.test.tsx +++ b/components/src/atoms/ListButton/__tests__/ListButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/components/src/atoms/ListButton/__tests__/ListButtonAccordion.test.tsx b/components/src/atoms/ListButton/__tests__/ListButtonAccordion.test.tsx index c90b09d651d..29a2673c773 100644 --- a/components/src/atoms/ListButton/__tests__/ListButtonAccordion.test.tsx +++ b/components/src/atoms/ListButton/__tests__/ListButtonAccordion.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '../../../testing/utils' diff --git a/components/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx b/components/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx index 2f3bfb95d5b..e9448ffabdf 100644 --- a/components/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx +++ b/components/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../testing/utils' diff --git a/components/src/atoms/ListButton/index.tsx b/components/src/atoms/ListButton/index.tsx index ab6cb36eb60..d2262738ea5 100644 --- a/components/src/atoms/ListButton/index.tsx +++ b/components/src/atoms/ListButton/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Flex } from '../../primitives' import { SPACING } from '../../ui-style-constants' diff --git a/components/src/atoms/ListItem/ListItem.stories.tsx b/components/src/atoms/ListItem/ListItem.stories.tsx index cba9fb3c364..0738b583cde 100644 --- a/components/src/atoms/ListItem/ListItem.stories.tsx +++ b/components/src/atoms/ListItem/ListItem.stories.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { SPACING, VIEWPORT } from '../../ui-style-constants' import { DIRECTION_COLUMN } from '../../styles' import { Flex } from '../../primitives' diff --git a/components/src/atoms/ListItem/ListItemChildren/ListItemCustomize.tsx b/components/src/atoms/ListItem/ListItemChildren/ListItemCustomize.tsx index 31df0c09b4b..aa04dd91722 100644 --- a/components/src/atoms/ListItem/ListItemChildren/ListItemCustomize.tsx +++ b/components/src/atoms/ListItem/ListItemChildren/ListItemCustomize.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, JUSTIFY_CENTER } from '../../../styles' import { COLORS } from '../../../helix-design-system' diff --git a/components/src/atoms/ListItem/ListItemChildren/ListItemDescriptor.tsx b/components/src/atoms/ListItem/ListItemChildren/ListItemDescriptor.tsx index 92fc85182f6..7560bf25e5e 100644 --- a/components/src/atoms/ListItem/ListItemChildren/ListItemDescriptor.tsx +++ b/components/src/atoms/ListItem/ListItemChildren/ListItemDescriptor.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex } from '../../../primitives' import { ALIGN_CENTER, diff --git a/components/src/atoms/ListItem/__tests__/ListItem.test.tsx b/components/src/atoms/ListItem/__tests__/ListItem.test.tsx index 0429b65da73..2f25b883fae 100644 --- a/components/src/atoms/ListItem/__tests__/ListItem.test.tsx +++ b/components/src/atoms/ListItem/__tests__/ListItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/components/src/atoms/ListItem/index.tsx b/components/src/atoms/ListItem/index.tsx index 93ac9ca46e5..a9b97c529f0 100644 --- a/components/src/atoms/ListItem/index.tsx +++ b/components/src/atoms/ListItem/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Flex } from '../../primitives' import { RESPONSIVENESS, SPACING } from '../../ui-style-constants' diff --git a/components/src/atoms/MenuList/MenuList.stories.tsx b/components/src/atoms/MenuList/MenuList.stories.tsx index 18af71f0160..26900db0728 100644 --- a/components/src/atoms/MenuList/MenuList.stories.tsx +++ b/components/src/atoms/MenuList/MenuList.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { action } from '@storybook/addon-actions' import { MenuList as MenuListComponent } from './index' import { MenuItem } from './MenuItem' diff --git a/components/src/atoms/MenuList/__tests__/MenuItem.test.tsx b/components/src/atoms/MenuList/__tests__/MenuItem.test.tsx index 87bfd3c50b1..f6d0485be45 100644 --- a/components/src/atoms/MenuList/__tests__/MenuItem.test.tsx +++ b/components/src/atoms/MenuList/__tests__/MenuItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/components/src/atoms/MenuList/__tests__/MenuList.test.tsx b/components/src/atoms/MenuList/__tests__/MenuList.test.tsx index 3df44913f42..e38e145eceb 100644 --- a/components/src/atoms/MenuList/__tests__/MenuList.test.tsx +++ b/components/src/atoms/MenuList/__tests__/MenuList.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/components/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx b/components/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx index a5b7fab1473..00f080fae2c 100644 --- a/components/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx +++ b/components/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, it, expect, describe } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/components/src/atoms/MenuList/index.tsx b/components/src/atoms/MenuList/index.tsx index 4896d64c43d..7b930243ba0 100644 --- a/components/src/atoms/MenuList/index.tsx +++ b/components/src/atoms/MenuList/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { BORDERS, COLORS } from '../../helix-design-system' import { diff --git a/components/src/atoms/Snackbar/__tests__/Snackbar.test.tsx b/components/src/atoms/Snackbar/__tests__/Snackbar.test.tsx index 816f3a079fe..a4ae1f8f6b0 100644 --- a/components/src/atoms/Snackbar/__tests__/Snackbar.test.tsx +++ b/components/src/atoms/Snackbar/__tests__/Snackbar.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen, act } from '@testing-library/react' diff --git a/components/src/atoms/Snackbar/index.tsx b/components/src/atoms/Snackbar/index.tsx index d7053398ed5..a4a95e221c9 100644 --- a/components/src/atoms/Snackbar/index.tsx +++ b/components/src/atoms/Snackbar/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { css } from 'styled-components' import { ALIGN_CENTER } from '../../styles' import { Flex } from '../../primitives' @@ -56,7 +56,7 @@ const CLOSE_STYLE = css` export function Snackbar(props: SnackbarProps): JSX.Element { const { message, onClose, duration = 4000, ...styleProps } = props - const [isClosed, setIsClosed] = React.useState(false) + const [isClosed, setIsClosed] = useState(false) const animationStyle = isClosed ? CLOSE_STYLE : OPEN_STYLE diff --git a/components/src/atoms/StepMeter/index.tsx b/components/src/atoms/StepMeter/index.tsx index 91f151fb5c9..f5986516213 100644 --- a/components/src/atoms/StepMeter/index.tsx +++ b/components/src/atoms/StepMeter/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { Box } from '../../primitives' import { RESPONSIVENESS, SPACING } from '../../ui-style-constants' diff --git a/components/src/atoms/StyledText/LegacyStyledText.stories.tsx b/components/src/atoms/StyledText/LegacyStyledText.stories.tsx index 0f5648751ed..acd169393a1 100644 --- a/components/src/atoms/StyledText/LegacyStyledText.stories.tsx +++ b/components/src/atoms/StyledText/LegacyStyledText.stories.tsx @@ -1,5 +1,4 @@ /* eslint-disable storybook/prefer-pascal-case */ -import * as React from 'react' import { SPACING, TYPOGRAPHY } from '../../ui-style-constants' import { Flex } from '../../primitives' import { LegacyStyledText } from './index' diff --git a/components/src/atoms/StyledText/StyledText.stories.tsx b/components/src/atoms/StyledText/StyledText.stories.tsx index 11b198698c5..f9e6548bb9b 100644 --- a/components/src/atoms/StyledText/StyledText.stories.tsx +++ b/components/src/atoms/StyledText/StyledText.stories.tsx @@ -1,5 +1,4 @@ /* eslint-disable storybook/prefer-pascal-case */ -import * as React from 'react' import { SPACING } from '../../ui-style-constants' import { Flex } from '../../primitives' import { StyledText, ODD_STYLES, HELIX_STYLES } from './index' diff --git a/components/src/atoms/Tag/Tag.stories.tsx b/components/src/atoms/Tag/Tag.stories.tsx index 6ebc48a5177..2c3db328ab3 100644 --- a/components/src/atoms/Tag/Tag.stories.tsx +++ b/components/src/atoms/Tag/Tag.stories.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Flex } from '../../primitives' import { SPACING, VIEWPORT } from '../../ui-style-constants' import { Tag as TagComponent } from './index' diff --git a/components/src/atoms/Tag/__tests__/Tag.test.tsx b/components/src/atoms/Tag/__tests__/Tag.test.tsx index 986598a635d..dcb25c77d27 100644 --- a/components/src/atoms/Tag/__tests__/Tag.test.tsx +++ b/components/src/atoms/Tag/__tests__/Tag.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect } from 'vitest' import { screen } from '@testing-library/react' import { COLORS } from '../../../helix-design-system' diff --git a/components/src/atoms/Tag/index.tsx b/components/src/atoms/Tag/index.tsx index 00d66d56375..c41025dd25b 100644 --- a/components/src/atoms/Tag/index.tsx +++ b/components/src/atoms/Tag/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { BORDERS, COLORS } from '../../helix-design-system' import { Flex } from '../../primitives' diff --git a/components/src/atoms/Toast/__tests__/ODDToast.test.tsx b/components/src/atoms/Toast/__tests__/ODDToast.test.tsx index b402f02a7e8..d198df7f03e 100644 --- a/components/src/atoms/Toast/__tests__/ODDToast.test.tsx +++ b/components/src/atoms/Toast/__tests__/ODDToast.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { act, fireEvent, screen } from '@testing-library/react' diff --git a/components/src/atoms/Toast/__tests__/Toast.test.tsx b/components/src/atoms/Toast/__tests__/Toast.test.tsx index 2fafe011efd..5133651ecd6 100644 --- a/components/src/atoms/Toast/__tests__/Toast.test.tsx +++ b/components/src/atoms/Toast/__tests__/Toast.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { act, fireEvent, screen } from '@testing-library/react' diff --git a/components/src/atoms/Toast/index.tsx b/components/src/atoms/Toast/index.tsx index 2e6c05dabaa..04a202b69cf 100644 --- a/components/src/atoms/Toast/index.tsx +++ b/components/src/atoms/Toast/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { css } from 'styled-components' import { Btn, Flex, Link } from '../../primitives' @@ -71,7 +71,7 @@ export function Toast(props: ToastProps): JSX.Element { onLinkClick = () => null, ...styleProps } = props - const [isClosed, setIsClosed] = React.useState(exitNow) + const [isClosed, setIsClosed] = useState(exitNow) // We want to be able to storybook both the ODD and the Desktop versions, // so let it (and unit tests, for that matter) be able to pass in a parameter diff --git a/components/src/atoms/ToggleGroup/__tests__/ToggleGroup.test.tsx b/components/src/atoms/ToggleGroup/__tests__/ToggleGroup.test.tsx index 711567c8690..f7beb737696 100644 --- a/components/src/atoms/ToggleGroup/__tests__/ToggleGroup.test.tsx +++ b/components/src/atoms/ToggleGroup/__tests__/ToggleGroup.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../testing/utils' diff --git a/components/src/atoms/ToggleGroup/index.tsx b/components/src/atoms/ToggleGroup/index.tsx index 3dc44fb8984..110c3a243d5 100644 --- a/components/src/atoms/ToggleGroup/index.tsx +++ b/components/src/atoms/ToggleGroup/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { BORDERS, COLORS } from '../../helix-design-system' import { Flex } from '../../primitives' diff --git a/components/src/atoms/Tooltip/__tests__/Tooltip.test.tsx b/components/src/atoms/Tooltip/__tests__/Tooltip.test.tsx index 3816a4cff30..ddc1e4f6a1a 100644 --- a/components/src/atoms/Tooltip/__tests__/Tooltip.test.tsx +++ b/components/src/atoms/Tooltip/__tests__/Tooltip.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/components/src/atoms/Tooltip/index.tsx b/components/src/atoms/Tooltip/index.tsx index 1d8941fa6c5..6bc04add77c 100644 --- a/components/src/atoms/Tooltip/index.tsx +++ b/components/src/atoms/Tooltip/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { COLORS } from '../../helix-design-system' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/atoms/buttons/EmptySelectorButton.stories.tsx b/components/src/atoms/buttons/EmptySelectorButton.stories.tsx index 75a70ba602b..9251085f13a 100644 --- a/components/src/atoms/buttons/EmptySelectorButton.stories.tsx +++ b/components/src/atoms/buttons/EmptySelectorButton.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Box } from '../../primitives' import { EmptySelectorButton as EmptySelectorButtonComponent } from './EmptySelectorButton' import type { Meta, StoryObj } from '@storybook/react' diff --git a/components/src/atoms/buttons/EmptySelectorButton.tsx b/components/src/atoms/buttons/EmptySelectorButton.tsx index e81b7fdb06e..92caa541fce 100644 --- a/components/src/atoms/buttons/EmptySelectorButton.tsx +++ b/components/src/atoms/buttons/EmptySelectorButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { Flex } from '../../primitives' import { diff --git a/components/src/atoms/buttons/LargeButton.stories.tsx b/components/src/atoms/buttons/LargeButton.stories.tsx index 5d8715e49f4..a808af9f345 100644 --- a/components/src/atoms/buttons/LargeButton.stories.tsx +++ b/components/src/atoms/buttons/LargeButton.stories.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { ICON_DATA_BY_NAME } from '../../icons' import { SPACING } from '../../ui-style-constants' import { Box } from '../../primitives' diff --git a/components/src/atoms/buttons/LargeButton.tsx b/components/src/atoms/buttons/LargeButton.tsx index 55904cdf57f..28beb378495 100644 --- a/components/src/atoms/buttons/LargeButton.tsx +++ b/components/src/atoms/buttons/LargeButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Box, Btn } from '../../primitives' diff --git a/components/src/atoms/buttons/RadioButton.tsx b/components/src/atoms/buttons/RadioButton.tsx index b11278e37fb..773ceefb309 100644 --- a/components/src/atoms/buttons/RadioButton.tsx +++ b/components/src/atoms/buttons/RadioButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled, { css } from 'styled-components' import { Flex } from '../../primitives' import { diff --git a/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx b/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx index 41c1f3c0d28..cad0175d981 100644 --- a/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/AlertPrimaryButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/atoms/buttons/__tests__/AltPrimaryButton.test.tsx b/components/src/atoms/buttons/__tests__/AltPrimaryButton.test.tsx index 4b9db95303b..f65613d0561 100644 --- a/components/src/atoms/buttons/__tests__/AltPrimaryButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/AltPrimaryButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/atoms/buttons/__tests__/EmptySelectorButton.test.tsx b/components/src/atoms/buttons/__tests__/EmptySelectorButton.test.tsx index a1833c7181f..ea7ab6c2b2b 100644 --- a/components/src/atoms/buttons/__tests__/EmptySelectorButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/EmptySelectorButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/components/src/atoms/buttons/__tests__/LargeButton.test.tsx b/components/src/atoms/buttons/__tests__/LargeButton.test.tsx index 70766d0cafa..52f6c9e71f6 100644 --- a/components/src/atoms/buttons/__tests__/LargeButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/LargeButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx b/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx index 8353bba24f9..558f4a595eb 100644 --- a/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/PrimaryButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/atoms/buttons/__tests__/RadioButton.test.tsx b/components/src/atoms/buttons/__tests__/RadioButton.test.tsx index aa7ddf0771e..95aaf6532fc 100644 --- a/components/src/atoms/buttons/__tests__/RadioButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/RadioButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { screen, queryByAttribute } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx b/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx index c1c016e58f4..8887e679268 100644 --- a/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx +++ b/components/src/atoms/buttons/__tests__/SecondaryButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/atoms/buttons/buttons.stories.tsx b/components/src/atoms/buttons/buttons.stories.tsx index 1eb63314d47..13160b8d6a8 100644 --- a/components/src/atoms/buttons/buttons.stories.tsx +++ b/components/src/atoms/buttons/buttons.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { SPACING } from '../../ui-style-constants' import { DIRECTION_ROW } from '../../styles' import { Flex } from '../../primitives' diff --git a/components/src/buttons/Button.tsx b/components/src/buttons/Button.tsx index ee8e1f22881..749c4e603a5 100644 --- a/components/src/buttons/Button.tsx +++ b/components/src/buttons/Button.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import omit from 'lodash/omit' diff --git a/components/src/buttons/DeprecatedPrimaryButton.tsx b/components/src/buttons/DeprecatedPrimaryButton.tsx index 7fd78bcbc32..cb6da4f3312 100644 --- a/components/src/buttons/DeprecatedPrimaryButton.tsx +++ b/components/src/buttons/DeprecatedPrimaryButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { Button } from './Button' diff --git a/components/src/buttons/FlatButton.tsx b/components/src/buttons/FlatButton.tsx index 165c5aebe58..eb808b7a0bb 100644 --- a/components/src/buttons/FlatButton.tsx +++ b/components/src/buttons/FlatButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import classnames from 'classnames' import { Button } from './Button' diff --git a/components/src/buttons/IconButton.tsx b/components/src/buttons/IconButton.tsx index 958417c64d6..c68517a0100 100644 --- a/components/src/buttons/IconButton.tsx +++ b/components/src/buttons/IconButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' diff --git a/components/src/buttons/OutlineButton.tsx b/components/src/buttons/OutlineButton.tsx index ee0b135e5ff..228e1781680 100644 --- a/components/src/buttons/OutlineButton.tsx +++ b/components/src/buttons/OutlineButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { Button } from './Button' diff --git a/components/src/controls/ControlInfo.tsx b/components/src/controls/ControlInfo.tsx index 6082cb27f58..81ff686162a 100644 --- a/components/src/controls/ControlInfo.tsx +++ b/components/src/controls/ControlInfo.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styles from './styles.module.css' diff --git a/components/src/controls/LabeledButton.tsx b/components/src/controls/LabeledButton.tsx index 3fa894fec69..fa507869ffd 100644 --- a/components/src/controls/LabeledButton.tsx +++ b/components/src/controls/LabeledButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { OutlineButton } from '../buttons' diff --git a/components/src/controls/LabeledCheckbox.tsx b/components/src/controls/LabeledCheckbox.tsx index d649750a46d..1479c46bf16 100644 --- a/components/src/controls/LabeledCheckbox.tsx +++ b/components/src/controls/LabeledCheckbox.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { DeprecatedCheckboxField } from '../forms' diff --git a/components/src/controls/LabeledControl.tsx b/components/src/controls/LabeledControl.tsx index cc67016599d..ce1089b28b3 100644 --- a/components/src/controls/LabeledControl.tsx +++ b/components/src/controls/LabeledControl.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ControlInfo } from './ControlInfo' import styles from './styles.module.css' diff --git a/components/src/controls/LabeledRadioGroup.tsx b/components/src/controls/LabeledRadioGroup.tsx index f305ec44a0e..0811762961f 100644 --- a/components/src/controls/LabeledRadioGroup.tsx +++ b/components/src/controls/LabeledRadioGroup.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { StackedLabeledControl } from './StackedLabeledControl' import { RadioGroup } from '../forms' diff --git a/components/src/controls/LabeledSelect.tsx b/components/src/controls/LabeledSelect.tsx index 2e7f8a5ab1b..6a99b5eab2c 100644 --- a/components/src/controls/LabeledSelect.tsx +++ b/components/src/controls/LabeledSelect.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { DropdownField } from '../forms' import { LabeledControl } from './LabeledControl' diff --git a/components/src/controls/LabeledToggle.tsx b/components/src/controls/LabeledToggle.tsx index 12086d280a2..3d7adecb4e6 100644 --- a/components/src/controls/LabeledToggle.tsx +++ b/components/src/controls/LabeledToggle.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { LabeledControl } from './LabeledControl' import { ToggleButton } from './ToggleButton' diff --git a/components/src/controls/StackedLabeledControl.tsx b/components/src/controls/StackedLabeledControl.tsx index ccc0f77a75d..01d1cc91e34 100644 --- a/components/src/controls/StackedLabeledControl.tsx +++ b/components/src/controls/StackedLabeledControl.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { ControlInfo } from './ControlInfo' import styles from './styles.module.css' diff --git a/components/src/controls/ToggleButton.tsx b/components/src/controls/ToggleButton.tsx index aa44fa24fef..8fba70d48be 100644 --- a/components/src/controls/ToggleButton.tsx +++ b/components/src/controls/ToggleButton.tsx @@ -1,5 +1,4 @@ // reusable toggle button with on off styling for connect to robot and opt in/out -import * as React from 'react' import cx from 'classnames' import { IconButton } from '../buttons' import styles from './styles.module.css' diff --git a/components/src/forms/DeprecatedCheckboxField.tsx b/components/src/forms/DeprecatedCheckboxField.tsx index 68452eb90e4..234c7fa5980 100644 --- a/components/src/forms/DeprecatedCheckboxField.tsx +++ b/components/src/forms/DeprecatedCheckboxField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' diff --git a/components/src/forms/DropdownField.tsx b/components/src/forms/DropdownField.tsx index 76c91e84d19..67b9a93adba 100644 --- a/components/src/forms/DropdownField.tsx +++ b/components/src/forms/DropdownField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '..' diff --git a/components/src/forms/FormGroup.stories.tsx b/components/src/forms/FormGroup.stories.tsx index 6545c313eab..a4a46627c80 100644 --- a/components/src/forms/FormGroup.stories.tsx +++ b/components/src/forms/FormGroup.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { FormGroup as FormGroupComponent } from './FormGroup' import { DeprecatedCheckboxField } from './DeprecatedCheckboxField.stories' diff --git a/components/src/forms/FormGroup.tsx b/components/src/forms/FormGroup.tsx index 9ca4face22e..8a394a22d82 100644 --- a/components/src/forms/FormGroup.tsx +++ b/components/src/forms/FormGroup.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' import styles from './forms.module.css' diff --git a/components/src/forms/LegacyInputField.tsx b/components/src/forms/LegacyInputField.tsx index 989f4509be3..79eb4cbeb38 100644 --- a/components/src/forms/LegacyInputField.tsx +++ b/components/src/forms/LegacyInputField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' import styles from './forms.module.css' diff --git a/components/src/forms/RadioGroup.tsx b/components/src/forms/RadioGroup.tsx index 5d409540032..c67cd88b06c 100644 --- a/components/src/forms/RadioGroup.tsx +++ b/components/src/forms/RadioGroup.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' import styles from './forms.module.css' diff --git a/components/src/forms/Select.stories.tsx b/components/src/forms/Select.stories.tsx index ba9df1e7b7c..beabb0e218e 100644 --- a/components/src/forms/Select.stories.tsx +++ b/components/src/forms/Select.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Select } from './Select' import styles from './Select.module.css' diff --git a/components/src/forms/Select.tsx b/components/src/forms/Select.tsx index d1341f106e2..c49dfce816f 100644 --- a/components/src/forms/Select.tsx +++ b/components/src/forms/Select.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import ReactSelect, { components as reactSelectComponents } from 'react-select' import cx from 'classnames' diff --git a/components/src/forms/SelectField.tsx b/components/src/forms/SelectField.tsx index cdb50c3fcac..e2cbea6d656 100644 --- a/components/src/forms/SelectField.tsx +++ b/components/src/forms/SelectField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import find from 'lodash/find' diff --git a/components/src/forms/ToggleField.tsx b/components/src/forms/ToggleField.tsx index 2b7611168cd..3b3e7485f18 100644 --- a/components/src/forms/ToggleField.tsx +++ b/components/src/forms/ToggleField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' diff --git a/components/src/hardware-sim/BaseDeck/BaseDeck.stories.tsx b/components/src/hardware-sim/BaseDeck/BaseDeck.stories.tsx index 0c108471c5a..6e7061362f1 100644 --- a/components/src/hardware-sim/BaseDeck/BaseDeck.stories.tsx +++ b/components/src/hardware-sim/BaseDeck/BaseDeck.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fixture96Plate, fixtureTiprack1000ul, diff --git a/components/src/hardware-sim/BaseDeck/SingleSlotFixture.tsx b/components/src/hardware-sim/BaseDeck/SingleSlotFixture.tsx index 0fe3ff526e6..518347b9dd7 100644 --- a/components/src/hardware-sim/BaseDeck/SingleSlotFixture.tsx +++ b/components/src/hardware-sim/BaseDeck/SingleSlotFixture.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { SlotBase } from './SlotBase' import { SlotClip } from './SlotClip' diff --git a/components/src/hardware-sim/BaseDeck/SlotBase.tsx b/components/src/hardware-sim/BaseDeck/SlotBase.tsx index 5c8b7eb6100..1da25dc72da 100644 --- a/components/src/hardware-sim/BaseDeck/SlotBase.tsx +++ b/components/src/hardware-sim/BaseDeck/SlotBase.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' export function SlotBase(props: React.SVGProps): JSX.Element { return diff --git a/components/src/hardware-sim/BaseDeck/SlotClip.tsx b/components/src/hardware-sim/BaseDeck/SlotClip.tsx index cd17d13c735..281a79603ea 100644 --- a/components/src/hardware-sim/BaseDeck/SlotClip.tsx +++ b/components/src/hardware-sim/BaseDeck/SlotClip.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { COLORS } from '../../helix-design-system' diff --git a/components/src/hardware-sim/BaseDeck/StagingAreaFixture.tsx b/components/src/hardware-sim/BaseDeck/StagingAreaFixture.tsx index 600d4bfbd6f..182084167c2 100644 --- a/components/src/hardware-sim/BaseDeck/StagingAreaFixture.tsx +++ b/components/src/hardware-sim/BaseDeck/StagingAreaFixture.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { SlotBase } from './SlotBase' import { SlotClip } from './SlotClip' diff --git a/components/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx b/components/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx index 44d2ab9c49c..2253e0f8726 100644 --- a/components/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx +++ b/components/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Icon } from '../../icons' import { Flex, Text } from '../../primitives' diff --git a/components/src/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.tsx b/components/src/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.tsx index a417263fddc..0034439ce12 100644 --- a/components/src/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.tsx +++ b/components/src/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { WASTE_CHUTE_CUTOUT } from '@opentrons/shared-data' diff --git a/components/src/hardware-sim/Deck/DeckFromLayers.tsx b/components/src/hardware-sim/Deck/DeckFromLayers.tsx index 644545b41bf..aaf8f979151 100644 --- a/components/src/hardware-sim/Deck/DeckFromLayers.tsx +++ b/components/src/hardware-sim/Deck/DeckFromLayers.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { OT2_ROBOT_TYPE } from '@opentrons/shared-data' import { FixedBase, diff --git a/components/src/hardware-sim/Deck/FlexTrash.tsx b/components/src/hardware-sim/Deck/FlexTrash.tsx index 038e21f857a..9b3c4c9fef9 100644 --- a/components/src/hardware-sim/Deck/FlexTrash.tsx +++ b/components/src/hardware-sim/Deck/FlexTrash.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { FLEX_ROBOT_TYPE, getDeckDefFromRobotType, diff --git a/components/src/hardware-sim/Deck/MoveLabwareOnDeck.stories.tsx b/components/src/hardware-sim/Deck/MoveLabwareOnDeck.stories.tsx index fc330717f7c..355cc3f6dc9 100644 --- a/components/src/hardware-sim/Deck/MoveLabwareOnDeck.stories.tsx +++ b/components/src/hardware-sim/Deck/MoveLabwareOnDeck.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fixture96Plate, FLEX_ROBOT_TYPE, diff --git a/components/src/hardware-sim/Deck/OT2Layers.tsx b/components/src/hardware-sim/Deck/OT2Layers.tsx index 35419cd7452..fe103ded268 100644 --- a/components/src/hardware-sim/Deck/OT2Layers.tsx +++ b/components/src/hardware-sim/Deck/OT2Layers.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function FixedBase(): JSX.Element { return ( diff --git a/components/src/hardware-sim/Deck/RobotCoordsForeignDiv.tsx b/components/src/hardware-sim/Deck/RobotCoordsForeignDiv.tsx index b402ff43069..27bb77522d0 100644 --- a/components/src/hardware-sim/Deck/RobotCoordsForeignDiv.tsx +++ b/components/src/hardware-sim/Deck/RobotCoordsForeignDiv.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box } from '../../primitives' export interface RobotCoordsForeignDivProps { diff --git a/components/src/hardware-sim/Deck/RobotCoordsForeignObject.tsx b/components/src/hardware-sim/Deck/RobotCoordsForeignObject.tsx index fba2041bf2a..e5c1db1d01d 100644 --- a/components/src/hardware-sim/Deck/RobotCoordsForeignObject.tsx +++ b/components/src/hardware-sim/Deck/RobotCoordsForeignObject.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Flex, ForeignObject } from '../../primitives' diff --git a/components/src/hardware-sim/Deck/RobotCoordsText.tsx b/components/src/hardware-sim/Deck/RobotCoordsText.tsx index dac46bff03c..73240e3fbca 100644 --- a/components/src/hardware-sim/Deck/RobotCoordsText.tsx +++ b/components/src/hardware-sim/Deck/RobotCoordsText.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' export interface RobotCoordsTextProps extends React.ComponentProps<'text'> { x: number diff --git a/components/src/hardware-sim/Deck/SlotLabels.tsx b/components/src/hardware-sim/Deck/SlotLabels.tsx index ffa69db790d..7a14d6215ec 100644 --- a/components/src/hardware-sim/Deck/SlotLabels.tsx +++ b/components/src/hardware-sim/Deck/SlotLabels.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' import { DeckInfoLabel } from '../../molecules' import { Flex } from '../../primitives' diff --git a/components/src/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.tsx b/components/src/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.tsx index 2e755eacbb7..a514eacfd70 100644 --- a/components/src/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/DeckConfigurator.stories.tsx b/components/src/hardware-sim/DeckConfigurator/DeckConfigurator.stories.tsx index 322f7a3281d..4397d993466 100644 --- a/components/src/hardware-sim/DeckConfigurator/DeckConfigurator.stories.tsx +++ b/components/src/hardware-sim/DeckConfigurator/DeckConfigurator.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { SINGLE_CENTER_SLOT_FIXTURE, diff --git a/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx b/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx index 7904d45b271..0d397ddaaac 100644 --- a/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/EmptyConfigFixture.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { Icon } from '../../icons' diff --git a/components/src/hardware-sim/DeckConfigurator/HeaterShakerFixture.tsx b/components/src/hardware-sim/DeckConfigurator/HeaterShakerFixture.tsx index a8691c3a22e..81b79008379 100644 --- a/components/src/hardware-sim/DeckConfigurator/HeaterShakerFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/HeaterShakerFixture.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/MagneticBlockFixture.tsx b/components/src/hardware-sim/DeckConfigurator/MagneticBlockFixture.tsx index 9e320691ddc..2bc53cd39ea 100644 --- a/components/src/hardware-sim/DeckConfigurator/MagneticBlockFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/MagneticBlockFixture.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.tsx b/components/src/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.tsx index 7cf99c37994..d4199198189 100644 --- a/components/src/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/StaticFixture.tsx b/components/src/hardware-sim/DeckConfigurator/StaticFixture.tsx index a0fcd1d97d1..cb2b4116cd1 100644 --- a/components/src/hardware-sim/DeckConfigurator/StaticFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/StaticFixture.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' import { RobotCoordsForeignObject } from '../Deck/RobotCoordsForeignObject' diff --git a/components/src/hardware-sim/DeckConfigurator/TemperatureModuleFixture.tsx b/components/src/hardware-sim/DeckConfigurator/TemperatureModuleFixture.tsx index 59419808f15..563f8b3fc5a 100644 --- a/components/src/hardware-sim/DeckConfigurator/TemperatureModuleFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/TemperatureModuleFixture.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/ThermocyclerFixture.tsx b/components/src/hardware-sim/DeckConfigurator/ThermocyclerFixture.tsx index 0c680bafa0c..b3c4e15897d 100644 --- a/components/src/hardware-sim/DeckConfigurator/ThermocyclerFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/ThermocyclerFixture.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/TrashBinConfigFixture.tsx b/components/src/hardware-sim/DeckConfigurator/TrashBinConfigFixture.tsx index 9fe12c06c52..edb82292bea 100644 --- a/components/src/hardware-sim/DeckConfigurator/TrashBinConfigFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/TrashBinConfigFixture.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.tsx b/components/src/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.tsx index c9e2ea56467..ba99e22e55b 100644 --- a/components/src/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.tsx +++ b/components/src/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Icon } from '../../icons' import { Btn, Text } from '../../primitives' import { TYPOGRAPHY } from '../../ui-style-constants' diff --git a/components/src/hardware-sim/DeckConfigurator/index.tsx b/components/src/hardware-sim/DeckConfigurator/index.tsx index 25e2bd1c3a0..f6c88acc2bd 100644 --- a/components/src/hardware-sim/DeckConfigurator/index.tsx +++ b/components/src/hardware-sim/DeckConfigurator/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { getDeckDefFromRobotType, diff --git a/components/src/hardware-sim/DeckSlotLocation/index.tsx b/components/src/hardware-sim/DeckSlotLocation/index.tsx index cf02aea6a8a..09f912007e0 100644 --- a/components/src/hardware-sim/DeckSlotLocation/index.tsx +++ b/components/src/hardware-sim/DeckSlotLocation/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { getPositionFromSlotId, OT2_ROBOT_TYPE, diff --git a/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.tsx b/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.tsx index 9c89739aee7..8eeda21aabe 100644 --- a/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.tsx +++ b/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96DeepWellAdapter.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS } from '../../../helix-design-system' export function Opentrons96DeepWellAdapter(): JSX.Element { diff --git a/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.tsx b/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.tsx index c9e331b3496..e87b02d91b5 100644 --- a/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.tsx +++ b/components/src/hardware-sim/Labware/LabwareAdapter/Opentrons96FlatBottomAdapter.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function Opentrons96FlatBottomAdapter(): JSX.Element { return ( diff --git a/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.tsx b/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.tsx index a3e05d3406b..15bb4282385 100644 --- a/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.tsx +++ b/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsAluminumFlatBottomPlate.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS } from '../../../helix-design-system' export function OpentronsAluminumFlatBottomPlate(): JSX.Element { diff --git a/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.tsx b/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.tsx index 04c8b5696ce..cef3d12ec23 100644 --- a/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.tsx +++ b/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsFlex96TiprackAdapter.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS } from '../../../helix-design-system' export function OpentronsFlex96TiprackAdapter(): JSX.Element { diff --git a/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.tsx b/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.tsx index d0ee517ac74..1f74c7c07ef 100644 --- a/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.tsx +++ b/components/src/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapter.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS } from '../../../helix-design-system' export function OpentronsUniversalFlatAdapter(): JSX.Element { diff --git a/components/src/hardware-sim/Labware/LabwareAdapter/index.tsx b/components/src/hardware-sim/Labware/LabwareAdapter/index.tsx index 476fff397f6..f3941d980af 100644 --- a/components/src/hardware-sim/Labware/LabwareAdapter/index.tsx +++ b/components/src/hardware-sim/Labware/LabwareAdapter/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Opentrons96DeepWellAdapter } from './Opentrons96DeepWellAdapter' import { Opentrons96FlatBottomAdapter } from './Opentrons96FlatBottomAdapter' import { OpentronsUniversalFlatAdapter } from './OpentronsUniversalFlatAdapter' diff --git a/components/src/hardware-sim/Labware/LabwareRender.stories.tsx b/components/src/hardware-sim/Labware/LabwareRender.stories.tsx index ba1fffb776a..94d05b11a6a 100644 --- a/components/src/hardware-sim/Labware/LabwareRender.stories.tsx +++ b/components/src/hardware-sim/Labware/LabwareRender.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fixture96Plate as _fixture96Plate, diff --git a/components/src/hardware-sim/Labware/LabwareRender.tsx b/components/src/hardware-sim/Labware/LabwareRender.tsx index 48d60a372d4..64f2f50eaef 100644 --- a/components/src/hardware-sim/Labware/LabwareRender.tsx +++ b/components/src/hardware-sim/Labware/LabwareRender.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { WellLabels, StyledWells, diff --git a/components/src/hardware-sim/Labware/LabwareStackRender.tsx b/components/src/hardware-sim/Labware/LabwareStackRender.tsx index bbd017cd868..92cdc64779f 100644 --- a/components/src/hardware-sim/Labware/LabwareStackRender.tsx +++ b/components/src/hardware-sim/Labware/LabwareStackRender.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { WellLabels, StaticLabware } from './labwareInternals' import { LabwareAdapter, labwareAdapterLoadNames } from './LabwareAdapter' import { COLORS } from '../../helix-design-system' diff --git a/components/src/hardware-sim/Labware/__tests__/Labware.test.tsx b/components/src/hardware-sim/Labware/__tests__/Labware.test.tsx index af6c01c23ae..cf2060bbe68 100644 --- a/components/src/hardware-sim/Labware/__tests__/Labware.test.tsx +++ b/components/src/hardware-sim/Labware/__tests__/Labware.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { render, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx b/components/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx index fac32984419..65a0edebdfd 100644 --- a/components/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx +++ b/components/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { render, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx b/components/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx index 84bfa2cfd16..c9ade2facd9 100644 --- a/components/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx +++ b/components/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { SLOT_RENDER_WIDTH, SLOT_RENDER_HEIGHT } from '@opentrons/shared-data' import { COLORS } from '../../../helix-design-system' diff --git a/components/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx b/components/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx index 465656ef702..88bd32a295a 100644 --- a/components/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx +++ b/components/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect } from 'vitest' import { render, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx b/components/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx index 501ab817b2b..ed76a64f206 100644 --- a/components/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx +++ b/components/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi } from 'vitest' import { render, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx b/components/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx index 1fe1b63f9ce..dc8af68a6c5 100644 --- a/components/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx +++ b/components/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect } from 'vitest' import { render, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/components/src/hardware-sim/Module/HeaterShaker.tsx b/components/src/hardware-sim/Module/HeaterShaker.tsx index 0cd3d2e3114..e4e554abbdd 100644 --- a/components/src/hardware-sim/Module/HeaterShaker.tsx +++ b/components/src/hardware-sim/Module/HeaterShaker.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { COLORS } from '../../helix-design-system' export interface HeaterShakerVizProps { diff --git a/components/src/hardware-sim/Module/MagneticBlock.tsx b/components/src/hardware-sim/Module/MagneticBlock.tsx index db856e174f2..6c8d7f633fa 100644 --- a/components/src/hardware-sim/Module/MagneticBlock.tsx +++ b/components/src/hardware-sim/Module/MagneticBlock.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS } from '../../helix-design-system' export function MagneticBlock(): JSX.Element { diff --git a/components/src/hardware-sim/Module/MagneticModule.tsx b/components/src/hardware-sim/Module/MagneticModule.tsx index 512db86e9b6..c69a8dc36c7 100644 --- a/components/src/hardware-sim/Module/MagneticModule.tsx +++ b/components/src/hardware-sim/Module/MagneticModule.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function MagneticModule(): JSX.Element { return ( diff --git a/components/src/hardware-sim/Module/Module.stories.tsx b/components/src/hardware-sim/Module/Module.stories.tsx index 67b26a226d7..d7d5ff601df 100644 --- a/components/src/hardware-sim/Module/Module.stories.tsx +++ b/components/src/hardware-sim/Module/Module.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fixture96Plate, getModuleDef2, diff --git a/components/src/hardware-sim/Module/ModuleTag.tsx b/components/src/hardware-sim/Module/ModuleTag.tsx index 2410bcaf4e9..ae49ff2c9bc 100644 --- a/components/src/hardware-sim/Module/ModuleTag.tsx +++ b/components/src/hardware-sim/Module/ModuleTag.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { RobotCoordsForeignDiv, C_MED_LIGHT_GRAY, diff --git a/components/src/hardware-sim/Module/Temperature.tsx b/components/src/hardware-sim/Module/Temperature.tsx index b6d3667c9e7..66b9ef09d59 100644 --- a/components/src/hardware-sim/Module/Temperature.tsx +++ b/components/src/hardware-sim/Module/Temperature.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS } from '../../helix-design-system' export interface TemperatureVizProps { diff --git a/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.tsx b/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.tsx index 8b2282cde38..6111641b0aa 100644 --- a/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.tsx +++ b/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN1.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COLORS } from '../../../helix-design-system' interface ThermocyclerGEN1Props { lidMotorState: 'open' | 'closed' diff --git a/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.tsx b/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.tsx index 5218428ee09..4ecfba7f53d 100644 --- a/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.tsx +++ b/components/src/hardware-sim/Module/Thermocycler/ThermocyclerGEN2.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { COLORS } from '../../../helix-design-system' interface ThermocyclerGEN2Props { diff --git a/components/src/hardware-sim/Module/Thermocycler/index.tsx b/components/src/hardware-sim/Module/Thermocycler/index.tsx index e858e3ee92f..b758fa3bac3 100644 --- a/components/src/hardware-sim/Module/Thermocycler/index.tsx +++ b/components/src/hardware-sim/Module/Thermocycler/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { THERMOCYCLER_MODULE_V1, getModuleDef2 } from '@opentrons/shared-data' import { C_MED_LIGHT_GRAY } from '../../../styles' diff --git a/components/src/hardware-sim/Module/index.tsx b/components/src/hardware-sim/Module/index.tsx index ae1b6902337..1c8cc5c1afb 100644 --- a/components/src/hardware-sim/Module/index.tsx +++ b/components/src/hardware-sim/Module/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { getModuleType, HEATERSHAKER_MODULE_TYPE, diff --git a/components/src/hardware-sim/Pipette/EightEmanatingNozzles.tsx b/components/src/hardware-sim/Pipette/EightEmanatingNozzles.tsx index fa1521eef2c..22b1cad2e47 100644 --- a/components/src/hardware-sim/Pipette/EightEmanatingNozzles.tsx +++ b/components/src/hardware-sim/Pipette/EightEmanatingNozzles.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { EmanatingNozzle } from './EmanatingNozzle' export const EightEmanatingNozzles = (props: { @@ -8,7 +8,7 @@ export const EightEmanatingNozzles = (props: { const { cx, initialCy } = props const MULTI_CHANNEL_NOZZLE_SPACING = 9 return ( - + {[...Array(8)].map((_, i: number) => { return ( ) })} - + ) } diff --git a/components/src/hardware-sim/Pipette/EmanatingNozzle.tsx b/components/src/hardware-sim/Pipette/EmanatingNozzle.tsx index 9ed0c2eaf86..2218b1154eb 100644 --- a/components/src/hardware-sim/Pipette/EmanatingNozzle.tsx +++ b/components/src/hardware-sim/Pipette/EmanatingNozzle.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { C_SELECTED_DARK, C_TRANSPARENT } from '../../styles' import { SINGLE_CHANNEL_PIPETTE_HEIGHT } from './constants' @@ -8,7 +8,7 @@ export const EmanatingNozzle = (props: { }): JSX.Element => { const { cx, cy } = props return ( - + - + ) } diff --git a/components/src/hardware-sim/Pipette/PipetteRender.stories.tsx b/components/src/hardware-sim/Pipette/PipetteRender.stories.tsx index 1b3f56aac60..204806ccb43 100644 --- a/components/src/hardware-sim/Pipette/PipetteRender.stories.tsx +++ b/components/src/hardware-sim/Pipette/PipetteRender.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { getAllLabwareDefs, getAllPipetteNames } from '@opentrons/shared-data' import { LabwareRender } from '../Labware' import { RobotWorkSpace } from '../Deck' @@ -38,13 +38,13 @@ const Template: Story<{ return ( {() => ( - + - + )} ) diff --git a/components/src/hardware-sim/Pipette/PipetteRender.tsx b/components/src/hardware-sim/Pipette/PipetteRender.tsx index da850a308aa..7b2ebab0e66 100644 --- a/components/src/hardware-sim/Pipette/PipetteRender.tsx +++ b/components/src/hardware-sim/Pipette/PipetteRender.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { getPipetteNameSpecs } from '@opentrons/shared-data' import { C_MED_DARK_GRAY, C_MED_GRAY } from '../../styles' import { BORDERS } from '../../helix-design-system' diff --git a/components/src/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.tsx b/components/src/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.tsx index 1d37e6b4648..c1b18c65b8b 100644 --- a/components/src/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.tsx +++ b/components/src/hardware-sim/Pipette/__tests__/EightEmanatingNozzles.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { render } from '@testing-library/react' import { EightEmanatingNozzles } from '../EightEmanatingNozzles' diff --git a/components/src/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.tsx b/components/src/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.tsx index 615e3671daf..fcc1f2ae10f 100644 --- a/components/src/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.tsx +++ b/components/src/hardware-sim/Pipette/__tests__/EmanatingNozzle.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect } from 'vitest' import { render, screen } from '@testing-library/react' import { C_SELECTED_DARK, C_TRANSPARENT } from '../../../styles' diff --git a/components/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx b/components/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx index 5d0cbcf655d..bf94221fe37 100644 --- a/components/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx +++ b/components/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { fixtureTiprack300ul as _fixtureTiprack300ul } from '@opentrons/shared-data' diff --git a/components/src/hardware-sim/ProtocolDeck/LabwareInfo.tsx b/components/src/hardware-sim/ProtocolDeck/LabwareInfo.tsx index d35e4cec27d..d8c9b44a9f1 100644 --- a/components/src/hardware-sim/ProtocolDeck/LabwareInfo.tsx +++ b/components/src/hardware-sim/ProtocolDeck/LabwareInfo.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { RobotCoordsForeignDiv } from '../Deck' diff --git a/components/src/hardware-sim/ProtocolDeck/ProtocolDeck.stories.tsx b/components/src/hardware-sim/ProtocolDeck/ProtocolDeck.stories.tsx index 6563bc0a12f..df49174b669 100644 --- a/components/src/hardware-sim/ProtocolDeck/ProtocolDeck.stories.tsx +++ b/components/src/hardware-sim/ProtocolDeck/ProtocolDeck.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import analysisFileFixture from './__fixtures__/analysis_QIAseqFX24xv4_8.json' import { ProtocolDeck as ProtocolDeckComponent } from './' diff --git a/components/src/hardware-sim/ProtocolDeck/index.tsx b/components/src/hardware-sim/ProtocolDeck/index.tsx index fb172dea93d..fb1ac06349b 100644 --- a/components/src/hardware-sim/ProtocolDeck/index.tsx +++ b/components/src/hardware-sim/ProtocolDeck/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { FLEX_ROBOT_TYPE, diff --git a/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.tsx b/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.tsx index 0ed3c523294..6c9ccb46338 100644 --- a/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.tsx +++ b/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components' import { animated } from '@react-spring/web' -import * as React from 'react' +import type * as React from 'react' import { Svg } from '../../primitives' interface RobotCoordinateSpaceProps extends React.ComponentProps { diff --git a/components/src/hooks/useSelectDeckLocation/index.tsx b/components/src/hooks/useSelectDeckLocation/index.tsx index 510042dc090..e16eb9fad1a 100644 --- a/components/src/hooks/useSelectDeckLocation/index.tsx +++ b/components/src/hooks/useSelectDeckLocation/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, Fragment } from 'react' import isEqual from 'lodash/isEqual' import { useTranslation } from 'react-i18next' import { @@ -59,10 +59,7 @@ export function useDeckLocationSelect( theme?: DeckLocationSelectThemes ): { DeckLocationSelect: JSX.Element; selectedLocation: ModuleLocation } { const deckDef = getDeckDefFromRobotType(robotType) - const [ - selectedLocation, - setSelectedLocation, - ] = React.useState({ + const [selectedLocation, setSelectedLocation] = useState({ slotName: deckDef.locations.addressableAreas[0].id, }) return { @@ -100,7 +97,7 @@ export function DeckLocationSelect({ const { t } = useTranslation('module_wizard_flows') - const [hoveredData, setHoveredData] = React.useState<{ + const [hoveredData, setHoveredData] = useState<{ slot: AddressableArea slotPosition: CoordinateTuple | null isDisabled: boolean @@ -193,7 +190,7 @@ export function DeckLocationSelect({ const cutoutId = FLEX_CUTOUT_BY_SLOT_ID[slot.id] return ( - + {robotType === FLEX_ROBOT_TYPE ? ( <> ) : null} - + ) })} {robotType === OT2_ROBOT_TYPE ? ( diff --git a/components/src/icons/Icon.stories.tsx b/components/src/icons/Icon.stories.tsx index 9d7b0f1141a..03f8a436e6f 100644 --- a/components/src/icons/Icon.stories.tsx +++ b/components/src/icons/Icon.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex } from '../primitives' import { SPACING } from '../ui-style-constants' import { ICON_DATA_BY_NAME } from './icon-data' diff --git a/components/src/icons/Icon.tsx b/components/src/icons/Icon.tsx index f39d429ae2d..7aff9bf3750 100644 --- a/components/src/icons/Icon.tsx +++ b/components/src/icons/Icon.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css, keyframes } from 'styled-components' import cx from 'classnames' diff --git a/components/src/icons/ModuleIcon.tsx b/components/src/icons/ModuleIcon.tsx index d5ba6b78b70..3a2ae275487 100644 --- a/components/src/icons/ModuleIcon.tsx +++ b/components/src/icons/ModuleIcon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from './Icon' import { HEATERSHAKER_MODULE_TYPE, diff --git a/components/src/icons/NotificationIcon.tsx b/components/src/icons/NotificationIcon.tsx index 278e152f126..25a158d934d 100644 --- a/components/src/icons/NotificationIcon.tsx +++ b/components/src/icons/NotificationIcon.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { COLOR_WARNING } from '../styles' import { Icon } from './Icon' import { ICON_DATA_BY_NAME } from './icon-data' diff --git a/components/src/instrument/InstrumentDiagram.stories.tsx b/components/src/instrument/InstrumentDiagram.stories.tsx index 1379a7fff58..2303ef4a76d 100644 --- a/components/src/instrument/InstrumentDiagram.stories.tsx +++ b/components/src/instrument/InstrumentDiagram.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import keyBy from 'lodash/keyBy' import { getAllPipetteNames, getPipetteNameSpecs } from '@opentrons/shared-data' diff --git a/components/src/instrument/InstrumentDiagram.tsx b/components/src/instrument/InstrumentDiagram.tsx index 8617009d601..6b3bd11f440 100644 --- a/components/src/instrument/InstrumentDiagram.tsx +++ b/components/src/instrument/InstrumentDiagram.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex } from '../primitives' import { ALIGN_CENTER, JUSTIFY_CENTER } from '../styles' import singleSrc from './single_channel_GEN1_800px.png' diff --git a/components/src/instrument/InstrumentGroup.stories.tsx b/components/src/instrument/InstrumentGroup.stories.tsx index a2831f0fd27..a62016dd879 100644 --- a/components/src/instrument/InstrumentGroup.stories.tsx +++ b/components/src/instrument/InstrumentGroup.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import reduce from 'lodash/reduce' import keyBy from 'lodash/keyBy' import { getAllPipetteNames, getPipetteNameSpecs } from '@opentrons/shared-data' diff --git a/components/src/instrument/InstrumentGroup.tsx b/components/src/instrument/InstrumentGroup.tsx index a23138d9212..d9e677b2e17 100644 --- a/components/src/instrument/InstrumentGroup.tsx +++ b/components/src/instrument/InstrumentGroup.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { InstrumentInfo } from './InstrumentInfo' import styles from './instrument.module.css' diff --git a/components/src/instrument/InstrumentInfo.tsx b/components/src/instrument/InstrumentInfo.tsx index 5ff05415f7c..0c11ee9e7cb 100644 --- a/components/src/instrument/InstrumentInfo.tsx +++ b/components/src/instrument/InstrumentInfo.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { LEFT, RIGHT } from '@opentrons/shared-data' import { Flex } from '../primitives' diff --git a/components/src/instrument/PipetteSelect.tsx b/components/src/instrument/PipetteSelect.tsx index 6b677cb168d..358cc8ad6e3 100644 --- a/components/src/instrument/PipetteSelect.tsx +++ b/components/src/instrument/PipetteSelect.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import groupBy from 'lodash/groupBy' import { getAllPipetteNames, diff --git a/components/src/instrument/__tests__/InstrumentInfo.test.tsx b/components/src/instrument/__tests__/InstrumentInfo.test.tsx index defb66e7b2e..0101f7d6674 100644 --- a/components/src/instrument/__tests__/InstrumentInfo.test.tsx +++ b/components/src/instrument/__tests__/InstrumentInfo.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, beforeEach, it, vi } from 'vitest' import { LEFT, RIGHT, fixtureP1000SingleV2Specs } from '@opentrons/shared-data' diff --git a/components/src/legacy-hardware-sim/LabwareNameOverlay.tsx b/components/src/legacy-hardware-sim/LabwareNameOverlay.tsx index 4a03962a63e..ea329d73729 100644 --- a/components/src/legacy-hardware-sim/LabwareNameOverlay.tsx +++ b/components/src/legacy-hardware-sim/LabwareNameOverlay.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import styles from './LabwareNameOverlay.module.css' diff --git a/components/src/legacy-hardware-sim/ModuleItem.tsx b/components/src/legacy-hardware-sim/ModuleItem.tsx index 07854174943..5aadec1fa26 100644 --- a/components/src/legacy-hardware-sim/ModuleItem.tsx +++ b/components/src/legacy-hardware-sim/ModuleItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { diff --git a/components/src/lists/SidePanelGroup.tsx b/components/src/lists/SidePanelGroup.tsx index d531dad5245..4284c5aa45b 100644 --- a/components/src/lists/SidePanelGroup.tsx +++ b/components/src/lists/SidePanelGroup.tsx @@ -1,5 +1,5 @@ // SidePanelGroup component -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import styles from './lists.module.css' diff --git a/components/src/modals/AlertModal.tsx b/components/src/modals/AlertModal.tsx index 199d8bcf44a..3437bac077d 100644 --- a/components/src/modals/AlertModal.tsx +++ b/components/src/modals/AlertModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { OutlineButton } from '../buttons' diff --git a/components/src/modals/ContinueModal.tsx b/components/src/modals/ContinueModal.tsx index fd0eb7a172d..24558f6b05c 100644 --- a/components/src/modals/ContinueModal.tsx +++ b/components/src/modals/ContinueModal.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { AlertModal } from './AlertModal' import type { AlertModalProps } from './AlertModal' diff --git a/components/src/modals/Modal.stories.tsx b/components/src/modals/Modal.stories.tsx index 827cead477f..6adfcbc3274 100644 --- a/components/src/modals/Modal.stories.tsx +++ b/components/src/modals/Modal.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { LegacyStyledText } from '../atoms' import { SPACING, TYPOGRAPHY } from '../ui-style-constants' diff --git a/components/src/modals/Modal.tsx b/components/src/modals/Modal.tsx index 3760706d660..b997f77bf14 100644 --- a/components/src/modals/Modal.tsx +++ b/components/src/modals/Modal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box } from '../primitives' import { SPACING } from '../ui-style-constants' import { COLORS } from '../helix-design-system' diff --git a/components/src/modals/ModalHeader.tsx b/components/src/modals/ModalHeader.tsx index 2e167e45ecb..70ab315725a 100644 --- a/components/src/modals/ModalHeader.tsx +++ b/components/src/modals/ModalHeader.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Icon } from '../icons' diff --git a/components/src/modals/ModalShell.tsx b/components/src/modals/ModalShell.tsx index 27007d0ea89..0f2beca1c43 100644 --- a/components/src/modals/ModalShell.tsx +++ b/components/src/modals/ModalShell.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled from 'styled-components' import { ALIGN_CENTER, diff --git a/components/src/modals/Overlay.tsx b/components/src/modals/Overlay.tsx index 0d3196fc685..e429b251903 100644 --- a/components/src/modals/Overlay.tsx +++ b/components/src/modals/Overlay.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Flex, POSITION_FIXED } from '..' export interface OverlayProps extends React.ComponentProps { diff --git a/components/src/modals/SpinnerModal.tsx b/components/src/modals/SpinnerModal.tsx index 2405259892a..adbf289304a 100644 --- a/components/src/modals/SpinnerModal.tsx +++ b/components/src/modals/SpinnerModal.tsx @@ -1,5 +1,4 @@ // titled modal page component -import * as React from 'react' import cx from 'classnames' import { Overlay } from './Overlay' import { Icon } from '../icons' diff --git a/components/src/modals/SpinnerModalPage.tsx b/components/src/modals/SpinnerModalPage.tsx index da61784eb04..4393631a547 100644 --- a/components/src/modals/SpinnerModalPage.tsx +++ b/components/src/modals/SpinnerModalPage.tsx @@ -1,5 +1,5 @@ // titled modal page component -import * as React from 'react' +import type * as React from 'react' import { TitleBar } from '../structure' import { SpinnerModal } from './SpinnerModal' diff --git a/components/src/modals/__tests__/Modal.test.tsx b/components/src/modals/__tests__/Modal.test.tsx index c6aec42c89c..1dfa84cdaca 100644 --- a/components/src/modals/__tests__/Modal.test.tsx +++ b/components/src/modals/__tests__/Modal.test.tsx @@ -1,5 +1,5 @@ // -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' import { describe, it, expect, beforeEach } from 'vitest' diff --git a/components/src/modals/__tests__/ModalHeader.test.tsx b/components/src/modals/__tests__/ModalHeader.test.tsx index 8ae3bc9708c..d0e790b2fce 100644 --- a/components/src/modals/__tests__/ModalHeader.test.tsx +++ b/components/src/modals/__tests__/ModalHeader.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/components/src/modals/__tests__/ModalShell.test.tsx b/components/src/modals/__tests__/ModalShell.test.tsx index f106d00841c..1e1be0304f5 100644 --- a/components/src/modals/__tests__/ModalShell.test.tsx +++ b/components/src/modals/__tests__/ModalShell.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' import { describe, it, expect, beforeEach } from 'vitest' diff --git a/components/src/molecules/Banner/Banner.stories.tsx b/components/src/molecules/Banner/Banner.stories.tsx index b3370a40dc6..972943ed7f7 100644 --- a/components/src/molecules/Banner/Banner.stories.tsx +++ b/components/src/molecules/Banner/Banner.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { StyledText } from '../../atoms/StyledText' import { Banner } from './index' diff --git a/components/src/molecules/Banner/__tests__/Banner.test.tsx b/components/src/molecules/Banner/__tests__/Banner.test.tsx index 62109e1aaf9..f9ae53a7bf5 100644 --- a/components/src/molecules/Banner/__tests__/Banner.test.tsx +++ b/components/src/molecules/Banner/__tests__/Banner.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../testing/utils' diff --git a/components/src/molecules/Banner/index.tsx b/components/src/molecules/Banner/index.tsx index c15dbabd663..efcfe95bb07 100644 --- a/components/src/molecules/Banner/index.tsx +++ b/components/src/molecules/Banner/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Btn, Flex } from '../../primitives' import { Icon } from '../../icons' diff --git a/components/src/molecules/DeckInfoLabel/DeckInfoLabel.stories.tsx b/components/src/molecules/DeckInfoLabel/DeckInfoLabel.stories.tsx index ee604d56453..b6a06d302be 100644 --- a/components/src/molecules/DeckInfoLabel/DeckInfoLabel.stories.tsx +++ b/components/src/molecules/DeckInfoLabel/DeckInfoLabel.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { customViewports } from '../../../../.storybook/preview' import { Flex } from '../../primitives' import { SPACING } from '../../ui-style-constants' diff --git a/components/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx b/components/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx index c6c055b11d8..7a7c7f6a782 100644 --- a/components/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx +++ b/components/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect } from 'vitest' import { renderWithProviders } from '../../../testing/utils' import { screen } from '@testing-library/react' diff --git a/components/src/molecules/DeckInfoLabel/index.tsx b/components/src/molecules/DeckInfoLabel/index.tsx index 3d571afdcde..12fba78b93b 100644 --- a/components/src/molecules/DeckInfoLabel/index.tsx +++ b/components/src/molecules/DeckInfoLabel/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { StyledText } from '../../atoms' diff --git a/components/src/molecules/DeckLabel/__tests__/DeckLabel.test.tsx b/components/src/molecules/DeckLabel/__tests__/DeckLabel.test.tsx index f0af517711a..088536e706a 100644 --- a/components/src/molecules/DeckLabel/__tests__/DeckLabel.test.tsx +++ b/components/src/molecules/DeckLabel/__tests__/DeckLabel.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach, expect } from 'vitest' diff --git a/components/src/molecules/DeckLabel/index.tsx b/components/src/molecules/DeckLabel/index.tsx index 9daefc562e4..d3a8c02b975 100644 --- a/components/src/molecules/DeckLabel/index.tsx +++ b/components/src/molecules/DeckLabel/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { getModuleType } from '@opentrons/shared-data' import { Flex } from '../../primitives' diff --git a/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx b/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx index 7116f635e38..ee1de9643e5 100644 --- a/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx +++ b/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen, fireEvent } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' diff --git a/components/src/molecules/DropdownMenu/index.tsx b/components/src/molecules/DropdownMenu/index.tsx index a0260b97596..dfdd0d3c7be 100644 --- a/components/src/molecules/DropdownMenu/index.tsx +++ b/components/src/molecules/DropdownMenu/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { css } from 'styled-components' import { BORDERS, COLORS } from '../../helix-design-system' @@ -81,18 +81,18 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element { error, } = props const [targetProps, tooltipProps] = useHoverTooltip() - const [showDropdownMenu, setShowDropdownMenu] = React.useState(false) + const [showDropdownMenu, setShowDropdownMenu] = useState(false) - const [dropdownPosition, setDropdownPosition] = React.useState< - 'top' | 'bottom' - >('bottom') + const [dropdownPosition, setDropdownPosition] = useState<'top' | 'bottom'>( + 'bottom' + ) const dropDownMenuWrapperRef = useOnClickOutside({ onClickOutside: () => { setShowDropdownMenu(false) }, }) - React.useEffect(() => { + useEffect(() => { const handlePositionCalculation = (): void => { const dropdownRect = dropDownMenuWrapperRef.current?.getBoundingClientRect() if (dropdownRect != null) { diff --git a/components/src/molecules/InfoScreen/InfoScreen.stories.tsx b/components/src/molecules/InfoScreen/InfoScreen.stories.tsx index b854dd74652..f0e5f601c97 100644 --- a/components/src/molecules/InfoScreen/InfoScreen.stories.tsx +++ b/components/src/molecules/InfoScreen/InfoScreen.stories.tsx @@ -1,3 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars import * as React from 'react-remove-scroll' import { Flex } from '../../primitives' import { SPACING } from '../../ui-style-constants' diff --git a/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx b/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx index 0f5555e52ba..8e3e53faed0 100644 --- a/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx +++ b/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, beforeEach } from 'vitest' diff --git a/components/src/molecules/InfoScreen/index.tsx b/components/src/molecules/InfoScreen/index.tsx index 9b976f227ee..5c5d64a0365 100644 --- a/components/src/molecules/InfoScreen/index.tsx +++ b/components/src/molecules/InfoScreen/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { BORDERS, COLORS } from '../../helix-design-system' import { SPACING, TYPOGRAPHY } from '../../ui-style-constants/index' import { LegacyStyledText } from '../../atoms/StyledText' diff --git a/components/src/molecules/LiquidIcon/LiquidIcon.stories.tsx b/components/src/molecules/LiquidIcon/LiquidIcon.stories.tsx index e72eb633dc0..6c8dc5b3a0e 100644 --- a/components/src/molecules/LiquidIcon/LiquidIcon.stories.tsx +++ b/components/src/molecules/LiquidIcon/LiquidIcon.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex } from '../../primitives' import { SPACING } from '../../ui-style-constants' import { customViewports } from '../../../../.storybook/preview' diff --git a/components/src/molecules/LiquidIcon/__tests__/LiquidIcon.test.tsx b/components/src/molecules/LiquidIcon/__tests__/LiquidIcon.test.tsx index 95fbdb0c247..c50396f47fc 100644 --- a/components/src/molecules/LiquidIcon/__tests__/LiquidIcon.test.tsx +++ b/components/src/molecules/LiquidIcon/__tests__/LiquidIcon.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect } from 'vitest' import { renderWithProviders } from '../../../testing/utils' import { screen } from '@testing-library/react' diff --git a/components/src/molecules/LiquidIcon/index.tsx b/components/src/molecules/LiquidIcon/index.tsx index ca913c48491..4200a29e1a5 100644 --- a/components/src/molecules/LiquidIcon/index.tsx +++ b/components/src/molecules/LiquidIcon/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { Btn, Flex } from '../../primitives' import { SPACING } from '../../ui-style-constants' diff --git a/components/src/molecules/ParametersTable/ParametersTable.stories.tsx b/components/src/molecules/ParametersTable/ParametersTable.stories.tsx index d68e2f80a95..9240976f880 100644 --- a/components/src/molecules/ParametersTable/ParametersTable.stories.tsx +++ b/components/src/molecules/ParametersTable/ParametersTable.stories.tsx @@ -1,3 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars import * as React from 'react-remove-scroll' import { Flex } from '../../primitives' import { SPACING } from '../../ui-style-constants' diff --git a/components/src/molecules/ParametersTable/__tests__/ParametersTable.test.tsx b/components/src/molecules/ParametersTable/__tests__/ParametersTable.test.tsx index 5cd4b59a59b..dbe674a60f8 100644 --- a/components/src/molecules/ParametersTable/__tests__/ParametersTable.test.tsx +++ b/components/src/molecules/ParametersTable/__tests__/ParametersTable.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { renderWithProviders } from '../../../testing/utils' import { describe, it, beforeEach } from 'vitest' import { screen } from '@testing-library/react' diff --git a/components/src/molecules/ParametersTable/index.tsx b/components/src/molecules/ParametersTable/index.tsx index 55507bbe683..019d1e509f9 100644 --- a/components/src/molecules/ParametersTable/index.tsx +++ b/components/src/molecules/ParametersTable/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled, { css } from 'styled-components' import { formatRunTimeParameterDefaultValue, diff --git a/components/src/molecules/Tabs/Tabs.stories.tsx b/components/src/molecules/Tabs/Tabs.stories.tsx index b5842c56a71..2d26c974025 100644 --- a/components/src/molecules/Tabs/Tabs.stories.tsx +++ b/components/src/molecules/Tabs/Tabs.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useArgs } from '@storybook/preview-api' import { VIEWPORT } from '../../ui-style-constants' import { Tabs as TabsComponent } from '.' diff --git a/components/src/molecules/Tabs/__tests__/Tabs.test.tsx b/components/src/molecules/Tabs/__tests__/Tabs.test.tsx index 22ee8a23841..f78f2e525e2 100644 --- a/components/src/molecules/Tabs/__tests__/Tabs.test.tsx +++ b/components/src/molecules/Tabs/__tests__/Tabs.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { BORDERS, COLORS } from '../../../helix-design-system' diff --git a/components/src/molecules/Tabs/index.tsx b/components/src/molecules/Tabs/index.tsx index 6755d74f2e6..d9e6a7b349a 100644 --- a/components/src/molecules/Tabs/index.tsx +++ b/components/src/molecules/Tabs/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { TYPOGRAPHY, SPACING, RESPONSIVENESS } from '../../ui-style-constants' import { COLORS, BORDERS } from '../../helix-design-system' diff --git a/components/src/nav/SidePanel.stories.tsx b/components/src/nav/SidePanel.stories.tsx index 271b7a67e59..28d5556e23d 100644 --- a/components/src/nav/SidePanel.stories.tsx +++ b/components/src/nav/SidePanel.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { SidePanel as SidePanelComponent } from './SidePanel' import { Text, Flex, JUSTIFY_CENTER, ALIGN_CENTER } from '@opentrons/components' diff --git a/components/src/nav/SidePanel.tsx b/components/src/nav/SidePanel.tsx index e76064c5695..40bf476bfc0 100644 --- a/components/src/nav/SidePanel.tsx +++ b/components/src/nav/SidePanel.tsx @@ -1,5 +1,5 @@ // collapsable side panel -import * as React from 'react' +import type * as React from 'react' import styles from './SidePanel.module.css' export interface SidePanelProps { diff --git a/components/src/organisms/DeckLabelSet/DeckLabelSet.stories.tsx b/components/src/organisms/DeckLabelSet/DeckLabelSet.stories.tsx index feb347c09fe..5836fe5b947 100644 --- a/components/src/organisms/DeckLabelSet/DeckLabelSet.stories.tsx +++ b/components/src/organisms/DeckLabelSet/DeckLabelSet.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { BORDERS } from '../../helix-design-system' import { Flex } from '../../primitives' import { SPACING } from '../../ui-style-constants' diff --git a/components/src/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.tsx b/components/src/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.tsx index b8cdcf428ec..fbb6c1b274d 100644 --- a/components/src/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.tsx +++ b/components/src/organisms/DeckLabelSet/__tests__/DeckLabelSet.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/components/src/organisms/Toolbox/Toolbox.stories.tsx b/components/src/organisms/Toolbox/Toolbox.stories.tsx index 1dca5071be5..806b9ea02c5 100644 --- a/components/src/organisms/Toolbox/Toolbox.stories.tsx +++ b/components/src/organisms/Toolbox/Toolbox.stories.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { Toolbox as ToolboxComponent } from './index' import type { Meta, StoryObj } from '@storybook/react' diff --git a/components/src/organisms/Toolbox/__tests__/Toolbox.test.tsx b/components/src/organisms/Toolbox/__tests__/Toolbox.test.tsx index d1949077f93..9599e6e6591 100644 --- a/components/src/organisms/Toolbox/__tests__/Toolbox.test.tsx +++ b/components/src/organisms/Toolbox/__tests__/Toolbox.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../testing/utils' diff --git a/components/src/primitives/Btn.stories.tsx b/components/src/primitives/Btn.stories.tsx index f3abcd10ebd..61af15abc2a 100644 --- a/components/src/primitives/Btn.stories.tsx +++ b/components/src/primitives/Btn.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { PrimaryBtn, SecondaryBtn, diff --git a/components/src/primitives/Flex.stories.tsx b/components/src/primitives/Flex.stories.tsx index b48befe947e..35f07e7c453 100644 --- a/components/src/primitives/Flex.stories.tsx +++ b/components/src/primitives/Flex.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { BORDERS, COLORS } from '../helix-design-system' import { SPACING } from '../ui-style-constants' import { DIRECTION_COLUMN, JUSTIFY_SPACE_AROUND } from '../styles' diff --git a/components/src/primitives/Svg.stories.tsx b/components/src/primitives/Svg.stories.tsx index 088e5ed6721..ff95128337a 100644 --- a/components/src/primitives/Svg.stories.tsx +++ b/components/src/primitives/Svg.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Svg as SvgComponent } from './Svg' import type { Story, Meta } from '@storybook/react' diff --git a/components/src/primitives/Text.stories.tsx b/components/src/primitives/Text.stories.tsx index b6a117e1e72..69ee5dc5bd1 100644 --- a/components/src/primitives/Text.stories.tsx +++ b/components/src/primitives/Text.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Text as TextComponent } from './Text' import type { Story, Meta } from '@storybook/react' diff --git a/components/src/slotmap/OT2SlotMap.tsx b/components/src/slotmap/OT2SlotMap.tsx index d7723f38e98..20a2fecddf6 100644 --- a/components/src/slotmap/OT2SlotMap.tsx +++ b/components/src/slotmap/OT2SlotMap.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' import styles from './styles.module.css' diff --git a/components/src/structure/Card.stories.tsx b/components/src/structure/Card.stories.tsx index e6cb7b6ddf2..6282283022d 100644 --- a/components/src/structure/Card.stories.tsx +++ b/components/src/structure/Card.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Card as CardComponent } from './Card' import { Box, Text, SIZE_4, SPACING_3 } from '@opentrons/components' diff --git a/components/src/structure/Card.tsx b/components/src/structure/Card.tsx index 28738ce662d..8551bedf3fd 100644 --- a/components/src/structure/Card.tsx +++ b/components/src/structure/Card.tsx @@ -1,6 +1,6 @@ // Card component with drop shadow -import * as React from 'react' +import type * as React from 'react' import styled, { css } from 'styled-components' import { isntStyleProp, styleProps } from '../primitives' import * as styles from '../styles' diff --git a/components/src/structure/LabeledValue.stories.tsx b/components/src/structure/LabeledValue.stories.tsx index 32c657acd80..9056ee90cbf 100644 --- a/components/src/structure/LabeledValue.stories.tsx +++ b/components/src/structure/LabeledValue.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { LabeledValue as LabeledValueComponent } from './LabeledValue' import type { Story, Meta } from '@storybook/react' diff --git a/components/src/structure/LabeledValue.tsx b/components/src/structure/LabeledValue.tsx index b28f92f3982..bb80aa47f2c 100644 --- a/components/src/structure/LabeledValue.tsx +++ b/components/src/structure/LabeledValue.tsx @@ -1,6 +1,6 @@ // Card component with drop shadow -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import styles from './structure.module.css' diff --git a/components/src/structure/Pill.tsx b/components/src/structure/Pill.tsx index b1c1aae883a..ff6b2b7648c 100644 --- a/components/src/structure/Pill.tsx +++ b/components/src/structure/Pill.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import styles from './Pill.module.css' diff --git a/components/src/structure/Splash.stories.tsx b/components/src/structure/Splash.stories.tsx index 7c2b071d00d..6eebb2cf050 100644 --- a/components/src/structure/Splash.stories.tsx +++ b/components/src/structure/Splash.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Splash as SplashComponent } from './Splash' import { Box } from '@opentrons/components' diff --git a/components/src/structure/Splash.tsx b/components/src/structure/Splash.tsx index 37ec5a03786..bb3e2828fdf 100644 --- a/components/src/structure/Splash.tsx +++ b/components/src/structure/Splash.tsx @@ -1,5 +1,4 @@ /** A full-page icon in a muted color */ -import * as React from 'react' import cx from 'classnames' import { Icon } from '../icons' diff --git a/components/src/structure/TitleBar.stories.tsx b/components/src/structure/TitleBar.stories.tsx index 1d47c372cd1..1fb38e1e814 100644 --- a/components/src/structure/TitleBar.stories.tsx +++ b/components/src/structure/TitleBar.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { TitleBar } from './TitleBar' import { Text, Icon, SIZE_1 } from '@opentrons/components' diff --git a/components/src/structure/TitleBar.tsx b/components/src/structure/TitleBar.tsx index f4890406e5c..56fe864688f 100644 --- a/components/src/structure/TitleBar.tsx +++ b/components/src/structure/TitleBar.tsx @@ -1,6 +1,6 @@ // TitleBar component -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { FlatButton } from '../buttons' diff --git a/components/src/testing/utils/renderWithProviders.tsx b/components/src/testing/utils/renderWithProviders.tsx index c948fe54204..75287feabbc 100644 --- a/components/src/testing/utils/renderWithProviders.tsx +++ b/components/src/testing/utils/renderWithProviders.tsx @@ -1,6 +1,6 @@ // render using targetted component using @testing-library/react // with wrapping providers for i18next and redux -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { I18nextProvider } from 'react-i18next' import { Provider } from 'react-redux' diff --git a/components/src/tooltips/DeprecatedTooltip.tsx b/components/src/tooltips/DeprecatedTooltip.tsx index bb0e7e402c9..06283a7e0e2 100644 --- a/components/src/tooltips/DeprecatedTooltip.tsx +++ b/components/src/tooltips/DeprecatedTooltip.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Manager, Reference, Popper } from 'react-popper' import cx from 'classnames' import styles from './tooltips.module.css' diff --git a/components/src/tooltips/LegacyTooltip.stories.tsx b/components/src/tooltips/LegacyTooltip.stories.tsx index cac4daaca67..7063fe2914f 100644 --- a/components/src/tooltips/LegacyTooltip.stories.tsx +++ b/components/src/tooltips/LegacyTooltip.stories.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { LegacyTooltip } from './LegacyTooltip' import { useTooltip } from './useTooltip' import { useHoverTooltip } from './useHoverTooltip' diff --git a/labware-designer/src/App.tsx b/labware-designer/src/App.tsx index bf14bf25d4a..ebc6fe5ec7d 100644 --- a/labware-designer/src/App.tsx +++ b/labware-designer/src/App.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { GlobalStyle } from './atoms/GlobalStyle' import { CreateLabwareSandbox } from './organisms/CreateLabwareSandbox' diff --git a/labware-designer/src/index.tsx b/labware-designer/src/index.tsx index b79eb4d8e4d..7efe0a32f2d 100644 --- a/labware-designer/src/index.tsx +++ b/labware-designer/src/index.tsx @@ -1,6 +1,5 @@ import * as sharedData from '@opentrons/shared-data' -import React from 'react' import ReactDOM from 'react-dom/client' import { App } from './App' diff --git a/labware-designer/src/organisms/CreateLabwareSandbox/__tests__/CreateLabwareSandbox.test.tsx b/labware-designer/src/organisms/CreateLabwareSandbox/__tests__/CreateLabwareSandbox.test.tsx index 28f86ab7965..b8afdc4d7fb 100644 --- a/labware-designer/src/organisms/CreateLabwareSandbox/__tests__/CreateLabwareSandbox.test.tsx +++ b/labware-designer/src/organisms/CreateLabwareSandbox/__tests__/CreateLabwareSandbox.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, expect } from 'vitest' import { render, fireEvent, screen } from '@testing-library/react' diff --git a/labware-library/src/components/App/Page.tsx b/labware-library/src/components/App/Page.tsx index 5d395410311..07a321d4ae0 100644 --- a/labware-library/src/components/App/Page.tsx +++ b/labware-library/src/components/App/Page.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import styles from './styles.module.css' diff --git a/labware-library/src/components/App/index.tsx b/labware-library/src/components/App/index.tsx index bb9b907da77..ebdea67358d 100644 --- a/labware-library/src/components/App/index.tsx +++ b/labware-library/src/components/App/index.tsx @@ -1,5 +1,5 @@ // main application wrapper component -import * as React from 'react' +import { useRef, useEffect } from 'react' import cx from 'classnames' import { useLocation } from 'react-router-dom' import { DefinitionRoute } from '../../definitions' @@ -16,11 +16,11 @@ import type { DefinitionRouteRenderProps } from '../../definitions' export function AppComponent(props: DefinitionRouteRenderProps): JSX.Element { const { definition } = props const location = useLocation() - const scrollRef = React.useRef(null) + const scrollRef = useRef(null) const filters = useFilters(location) const isDetailPage = Boolean(definition) - React.useEffect(() => { + useEffect(() => { if (scrollRef.current) scrollRef.current.scrollTop = 0 window.scrollTo(0, 0) }, [location.pathname, location.search]) diff --git a/labware-library/src/components/LabwareDetails/Dimensions.tsx b/labware-library/src/components/LabwareDetails/Dimensions.tsx index 43d87f8aa32..781ee4a7333 100644 --- a/labware-library/src/components/LabwareDetails/Dimensions.tsx +++ b/labware-library/src/components/LabwareDetails/Dimensions.tsx @@ -1,5 +1,4 @@ // labware dimensions for details page -import * as React from 'react' import round from 'lodash/round' import { getFootprintDiagram } from '@opentrons/components' import { diff --git a/labware-library/src/components/LabwareDetails/InsertDetails.tsx b/labware-library/src/components/LabwareDetails/InsertDetails.tsx index c46cbf64fdf..c21109f7a14 100644 --- a/labware-library/src/components/LabwareDetails/InsertDetails.tsx +++ b/labware-library/src/components/LabwareDetails/InsertDetails.tsx @@ -1,6 +1,4 @@ // full-width labware details -import * as React from 'react' - import { getUniqueWellProperties } from '@opentrons/shared-data' import { getWellLabel, WellProperties, ManufacturerStats } from '../labware-ui' import { DetailsBox } from '../ui' diff --git a/labware-library/src/components/LabwareDetails/LabwareDetailsBox.tsx b/labware-library/src/components/LabwareDetails/LabwareDetailsBox.tsx index cd3ab94aa2a..b2c82a9aa32 100644 --- a/labware-library/src/components/LabwareDetails/LabwareDetailsBox.tsx +++ b/labware-library/src/components/LabwareDetails/LabwareDetailsBox.tsx @@ -1,5 +1,5 @@ // full-width labware details -import * as React from 'react' +import { Fragment } from 'react' import { getUniqueWellProperties } from '@opentrons/shared-data' import { getWellLabel, @@ -62,7 +62,7 @@ export function LabwareDetailsBox(props: LabwareDetailsBoxProps): JSX.Element { : '' return ( - + {!groupMetadata.displayCategory && irregular && ( <> - + ) })} diff --git a/labware-library/src/components/LabwareDetails/LabwareTitle.tsx b/labware-library/src/components/LabwareDetails/LabwareTitle.tsx index 54185fe68cf..db100b18b96 100644 --- a/labware-library/src/components/LabwareDetails/LabwareTitle.tsx +++ b/labware-library/src/components/LabwareDetails/LabwareTitle.tsx @@ -1,6 +1,4 @@ // labware details page title and category -import * as React from 'react' - import { LabelText, Value, LABEL_LEFT } from '../ui' import { CATEGORY, CATEGORY_LABELS_BY_CATEGORY } from '../../localization' diff --git a/labware-library/src/components/LabwareDetails/WellDimensions.tsx b/labware-library/src/components/LabwareDetails/WellDimensions.tsx index 837d7c92092..6d23bd82967 100644 --- a/labware-library/src/components/LabwareDetails/WellDimensions.tsx +++ b/labware-library/src/components/LabwareDetails/WellDimensions.tsx @@ -1,5 +1,4 @@ // well dimensions and spacing for details page -import * as React from 'react' import round from 'lodash/round' import { getMeasurementDiagram } from '@opentrons/components' import { diff --git a/labware-library/src/components/LabwareDetails/WellSpacing.tsx b/labware-library/src/components/LabwareDetails/WellSpacing.tsx index c34b72aafd4..0a05b33b364 100644 --- a/labware-library/src/components/LabwareDetails/WellSpacing.tsx +++ b/labware-library/src/components/LabwareDetails/WellSpacing.tsx @@ -1,5 +1,4 @@ // well dimensions and spacing for details page -import * as React from 'react' import round from 'lodash/round' import { getSpacingDiagram } from '@opentrons/components' import { diff --git a/labware-library/src/components/LabwareDetails/index.tsx b/labware-library/src/components/LabwareDetails/index.tsx index de7ae31d8c9..84f291f983d 100644 --- a/labware-library/src/components/LabwareDetails/index.tsx +++ b/labware-library/src/components/LabwareDetails/index.tsx @@ -1,5 +1,4 @@ // full-width labware details -import * as React from 'react' import { isNewLabware } from '../../definitions' import { Gallery, Tags, LoadName, NewLabwareAlert } from '../labware-ui' import { LabwareTitle } from './LabwareTitle' diff --git a/labware-library/src/components/LabwareList/CustomLabwareCard.tsx b/labware-library/src/components/LabwareList/CustomLabwareCard.tsx index 16f342a7c52..a0c232230f4 100644 --- a/labware-library/src/components/LabwareList/CustomLabwareCard.tsx +++ b/labware-library/src/components/LabwareList/CustomLabwareCard.tsx @@ -1,5 +1,4 @@ // labware creator display card -import * as React from 'react' import { Link } from 'react-router-dom' import { getPublicPath } from '../../public-path' import { diff --git a/labware-library/src/components/LabwareList/LabwareCard.tsx b/labware-library/src/components/LabwareList/LabwareCard.tsx index fc54fb351f6..77cdac48a16 100644 --- a/labware-library/src/components/LabwareList/LabwareCard.tsx +++ b/labware-library/src/components/LabwareList/LabwareCard.tsx @@ -1,5 +1,4 @@ // labware display card -import * as React from 'react' import uniq from 'lodash/uniq' import { Icon } from '@opentrons/components' import { getPublicPath } from '../../public-path' diff --git a/labware-library/src/components/LabwareList/index.tsx b/labware-library/src/components/LabwareList/index.tsx index 81845c397ef..c7821e0d954 100644 --- a/labware-library/src/components/LabwareList/index.tsx +++ b/labware-library/src/components/LabwareList/index.tsx @@ -1,5 +1,4 @@ // main LabwareList component -import * as React from 'react' import { getLabwareDefURI } from '@opentrons/shared-data' import { getFilteredDefinitions } from '../../filters' import { LabwareCard } from './LabwareCard' diff --git a/labware-library/src/components/Nav/Breadcrumbs.tsx b/labware-library/src/components/Nav/Breadcrumbs.tsx index 58eba56d76b..cdaf488e6e7 100644 --- a/labware-library/src/components/Nav/Breadcrumbs.tsx +++ b/labware-library/src/components/Nav/Breadcrumbs.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { BACK_TO_LABWARE_LIBRARY } from '../../localization' import { getPublicPath } from '../../public-path' import { Link } from '../ui' diff --git a/labware-library/src/components/Nav/index.tsx b/labware-library/src/components/Nav/index.tsx index fbd0f31c89f..e8c320b6146 100644 --- a/labware-library/src/components/Nav/index.tsx +++ b/labware-library/src/components/Nav/index.tsx @@ -1,5 +1,4 @@ // top nav bar component -import * as React from 'react' import { SubdomainNav, MainNav } from '../website-navigation' import styles from './styles.module.css' diff --git a/labware-library/src/components/Sidebar/FilterCategory.tsx b/labware-library/src/components/Sidebar/FilterCategory.tsx index 935104462a3..da3888d7e66 100644 --- a/labware-library/src/components/Sidebar/FilterCategory.tsx +++ b/labware-library/src/components/Sidebar/FilterCategory.tsx @@ -1,5 +1,4 @@ // filter labware by category -import * as React from 'react' import { Link } from 'react-router-dom' import cx from 'classnames' import { getAllCategories, buildFiltersUrl } from '../../filters' diff --git a/labware-library/src/components/Sidebar/FilterManufacturer.tsx b/labware-library/src/components/Sidebar/FilterManufacturer.tsx index 6aed332f847..e1c7d0776c1 100644 --- a/labware-library/src/components/Sidebar/FilterManufacturer.tsx +++ b/labware-library/src/components/Sidebar/FilterManufacturer.tsx @@ -1,5 +1,4 @@ // filter labware by manufacturer -import * as React from 'react' import { useNavigate } from 'react-router-dom' import { SelectField } from '@opentrons/components' import { getAllManufacturers, buildFiltersUrl } from '../../filters' diff --git a/labware-library/src/components/Sidebar/FilterReset.tsx b/labware-library/src/components/Sidebar/FilterReset.tsx index e2906bdeeba..023a849a44a 100644 --- a/labware-library/src/components/Sidebar/FilterReset.tsx +++ b/labware-library/src/components/Sidebar/FilterReset.tsx @@ -1,5 +1,4 @@ // reset all filters button -import * as React from 'react' import { Link } from 'react-router-dom' import { Icon } from '@opentrons/components' import { buildFiltersUrl, FILTER_OFF } from '../../filters' diff --git a/labware-library/src/components/Sidebar/LabwareGuide.tsx b/labware-library/src/components/Sidebar/LabwareGuide.tsx index c7dec66d7e6..d67447bb667 100644 --- a/labware-library/src/components/Sidebar/LabwareGuide.tsx +++ b/labware-library/src/components/Sidebar/LabwareGuide.tsx @@ -1,5 +1,4 @@ // labware filters -import * as React from 'react' import { Link } from 'react-router-dom' import { Icon } from '@opentrons/components' import { diff --git a/labware-library/src/components/Sidebar/index.tsx b/labware-library/src/components/Sidebar/index.tsx index 05913edd98a..baecfe961b8 100644 --- a/labware-library/src/components/Sidebar/index.tsx +++ b/labware-library/src/components/Sidebar/index.tsx @@ -1,5 +1,4 @@ // main application sidebar -import * as React from 'react' import { LabwareGuide } from './LabwareGuide' import { FilterManufacturer } from './FilterManufacturer' import { FilterCategory } from './FilterCategory' diff --git a/labware-library/src/components/labware-ui/LoadName.tsx b/labware-library/src/components/labware-ui/LoadName.tsx index dda4045ec91..d661fd8fa6d 100644 --- a/labware-library/src/components/labware-ui/LoadName.tsx +++ b/labware-library/src/components/labware-ui/LoadName.tsx @@ -1,5 +1,5 @@ // labware load name with copy button -import * as React from 'react' +import { useState, useRef, useEffect } from 'react' import { IconButton, DeprecatedTooltip } from '@opentrons/components' import { LabelText, LABEL_TOP } from '../ui' import { API_NAME, COPIED_TO_CLIPBOARD } from '../../localization' @@ -14,14 +14,14 @@ export interface LoadNameProps { export function LoadName(props: LoadNameProps): JSX.Element { const { loadName } = props - const [success, setSuccess] = React.useState(false) - const inputRef = React.useRef(null) - const successTimeout = React.useRef(null) + const [success, setSuccess] = useState(false) + const inputRef = useRef(null) + const successTimeout = useRef(null) const cleanupSuccessTimeout = (): void => { if (successTimeout.current) clearTimeout(successTimeout.current) } - React.useEffect(() => cleanupSuccessTimeout, []) + useEffect(() => cleanupSuccessTimeout, []) // note: we could choose to always copy the entire loadName string here, // regardless of what the user selects, but the benefit of catching missed diff --git a/labware-library/src/components/labware-ui/ManufacturerStats.tsx b/labware-library/src/components/labware-ui/ManufacturerStats.tsx index f2c7c83e36d..6041aab40fb 100644 --- a/labware-library/src/components/labware-ui/ManufacturerStats.tsx +++ b/labware-library/src/components/labware-ui/ManufacturerStats.tsx @@ -1,5 +1,4 @@ // labware details page title and category -import * as React from 'react' import { MANUFACTURER, MANUFACTURER_NO, diff --git a/labware-library/src/components/labware-ui/NewLabwareAlert.tsx b/labware-library/src/components/labware-ui/NewLabwareAlert.tsx index c8b7ee9e6fc..25021bb250f 100644 --- a/labware-library/src/components/labware-ui/NewLabwareAlert.tsx +++ b/labware-library/src/components/labware-ui/NewLabwareAlert.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Box, AlertItem } from '@opentrons/components' import { NEW_LABWARE_MESSAGE } from '../../localization' diff --git a/labware-library/src/components/labware-ui/Tags.tsx b/labware-library/src/components/labware-ui/Tags.tsx index 9ac0f03d310..ea47f8514fe 100644 --- a/labware-library/src/components/labware-ui/Tags.tsx +++ b/labware-library/src/components/labware-ui/Tags.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { LabelText, Value, LABEL_LEFT } from '../ui' import { TAGS } from '../../localization' import type { LabwareDefinition } from '../../types' diff --git a/labware-library/src/components/labware-ui/WellCount.tsx b/labware-library/src/components/labware-ui/WellCount.tsx index 0fd2825f09d..da78c7b3a8e 100644 --- a/labware-library/src/components/labware-ui/WellCount.tsx +++ b/labware-library/src/components/labware-ui/WellCount.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { COUNT } from '../../localization' import { LabelText, Value, LABEL_LEFT } from '../ui' import styles from './styles.module.css' diff --git a/labware-library/src/components/labware-ui/WellProperties.tsx b/labware-library/src/components/labware-ui/WellProperties.tsx index f8b043a1b5e..3c7c79d9073 100644 --- a/labware-library/src/components/labware-ui/WellProperties.tsx +++ b/labware-library/src/components/labware-ui/WellProperties.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from '@opentrons/components' import { getDisplayVolume, diff --git a/labware-library/src/components/ui/ClickableIcon.tsx b/labware-library/src/components/ui/ClickableIcon.tsx index 8c53beb0b9c..d0a719dcf2d 100644 --- a/labware-library/src/components/ui/ClickableIcon.tsx +++ b/labware-library/src/components/ui/ClickableIcon.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '@opentrons/components' import styles from './styles.module.css' diff --git a/labware-library/src/components/ui/DetailsBox.tsx b/labware-library/src/components/ui/DetailsBox.tsx index 4254b7876c3..8a0bbfac076 100644 --- a/labware-library/src/components/ui/DetailsBox.tsx +++ b/labware-library/src/components/ui/DetailsBox.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styles from './styles.module.css' export interface DetailsBoxProps { diff --git a/labware-library/src/components/ui/ExternalLink.tsx b/labware-library/src/components/ui/ExternalLink.tsx index c4b46ef1ae1..8ca0988428f 100644 --- a/labware-library/src/components/ui/ExternalLink.tsx +++ b/labware-library/src/components/ui/ExternalLink.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Icon } from '@opentrons/components' import styles from './styles.module.css' diff --git a/labware-library/src/components/ui/LabelText.tsx b/labware-library/src/components/ui/LabelText.tsx index 617bea6db80..9e459d9b411 100644 --- a/labware-library/src/components/ui/LabelText.tsx +++ b/labware-library/src/components/ui/LabelText.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import styles from './styles.module.css' diff --git a/labware-library/src/components/ui/LabeledValueTable.tsx b/labware-library/src/components/ui/LabeledValueTable.tsx index 3cc885bec63..ef992739b37 100644 --- a/labware-library/src/components/ui/LabeledValueTable.tsx +++ b/labware-library/src/components/ui/LabeledValueTable.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Table, TableEntry, TABLE_COLUMN } from './Table' import { LabelText, LABEL_LEFT } from './LabelText' import { Value } from './Value' diff --git a/labware-library/src/components/ui/Link.tsx b/labware-library/src/components/ui/Link.tsx index f51572e6695..b8cab6996e0 100644 --- a/labware-library/src/components/ui/Link.tsx +++ b/labware-library/src/components/ui/Link.tsx @@ -1,5 +1,5 @@ // internal link that preserves query parameters -import * as React from 'react' +import type * as React from 'react' import { Link as BaseLink, useLocation } from 'react-router-dom' export interface LinkProps { diff --git a/labware-library/src/components/ui/LowercaseText.tsx b/labware-library/src/components/ui/LowercaseText.tsx index 6f37f00861f..a923bf130dd 100644 --- a/labware-library/src/components/ui/LowercaseText.tsx +++ b/labware-library/src/components/ui/LowercaseText.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styles from './styles.module.css' diff --git a/labware-library/src/components/ui/Table.tsx b/labware-library/src/components/ui/Table.tsx index c4f09fb8497..14875b2cd8d 100644 --- a/labware-library/src/components/ui/Table.tsx +++ b/labware-library/src/components/ui/Table.tsx @@ -1,5 +1,5 @@ // "table" of data, usually filled with LabelText and Value children -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import styles from './styles.module.css' diff --git a/labware-library/src/components/ui/Value.tsx b/labware-library/src/components/ui/Value.tsx index ea822d3a6aa..bf8c4c15f34 100644 --- a/labware-library/src/components/ui/Value.tsx +++ b/labware-library/src/components/ui/Value.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styles from './styles.module.css' export interface ValueProps { diff --git a/labware-library/src/components/website-navigation/Logo.tsx b/labware-library/src/components/website-navigation/Logo.tsx index 4213fad1a76..684ce36218c 100644 --- a/labware-library/src/components/website-navigation/Logo.tsx +++ b/labware-library/src/components/website-navigation/Logo.tsx @@ -1,5 +1,4 @@ // top nav bar logo image -import * as React from 'react' import logoSrc from './images/ot-logo-full.png' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/MainNav.tsx b/labware-library/src/components/website-navigation/MainNav.tsx index 8e28c5a1000..ac1d8c46b76 100644 --- a/labware-library/src/components/website-navigation/MainNav.tsx +++ b/labware-library/src/components/website-navigation/MainNav.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Logo } from './Logo' import { NavList } from './NavList' import { MobileNav } from './MobileNav' diff --git a/labware-library/src/components/website-navigation/MenuButton.tsx b/labware-library/src/components/website-navigation/MenuButton.tsx index 646da7941b9..b1d6ca3ebe2 100644 --- a/labware-library/src/components/website-navigation/MenuButton.tsx +++ b/labware-library/src/components/website-navigation/MenuButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ClickableIcon } from '../ui' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/MobileContent.tsx b/labware-library/src/components/website-navigation/MobileContent.tsx index f69b2d7a6c3..d9bef7add46 100644 --- a/labware-library/src/components/website-navigation/MobileContent.tsx +++ b/labware-library/src/components/website-navigation/MobileContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { NavLink } from './NavLink' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/MobileList.tsx b/labware-library/src/components/website-navigation/MobileList.tsx index 24b8a271b7e..513dbb66484 100644 --- a/labware-library/src/components/website-navigation/MobileList.tsx +++ b/labware-library/src/components/website-navigation/MobileList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Component } from 'react' import styles from './styles.module.css' import { MobileMenu } from './MobileMenu' import { MobileContent } from './MobileContent' @@ -16,7 +16,7 @@ interface State { type Props = Record -export class MobileList extends React.Component { +export class MobileList extends Component { constructor(props: Props) { super(props) this.state = { menu: null } diff --git a/labware-library/src/components/website-navigation/MobileMenu.tsx b/labware-library/src/components/website-navigation/MobileMenu.tsx index 89ed77830d0..1ed70ad0dc8 100644 --- a/labware-library/src/components/website-navigation/MobileMenu.tsx +++ b/labware-library/src/components/website-navigation/MobileMenu.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Icon } from '@opentrons/components' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/MobileNav.tsx b/labware-library/src/components/website-navigation/MobileNav.tsx index 693de046d3f..23d0a5c5857 100644 --- a/labware-library/src/components/website-navigation/MobileNav.tsx +++ b/labware-library/src/components/website-navigation/MobileNav.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Component } from 'react' import { MenuButton } from './MenuButton' import { MobileList } from './MobileList' @@ -8,7 +8,7 @@ interface State { type Props = Record -export class MobileNav extends React.Component { +export class MobileNav extends Component { constructor(props: Props) { super(props) this.state = { isOpen: false } diff --git a/labware-library/src/components/website-navigation/NavLink.tsx b/labware-library/src/components/website-navigation/NavLink.tsx index 6100637d8f3..ce312e69bc6 100644 --- a/labware-library/src/components/website-navigation/NavLink.tsx +++ b/labware-library/src/components/website-navigation/NavLink.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/NavList.tsx b/labware-library/src/components/website-navigation/NavList.tsx index d9131864e73..961311f9ed9 100644 --- a/labware-library/src/components/website-navigation/NavList.tsx +++ b/labware-library/src/components/website-navigation/NavList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Component } from 'react' import cx from 'classnames' import { ClickOutside } from '@opentrons/components' import { aboutLinkProps, applicationLinkProps } from './nav-data' @@ -15,7 +15,7 @@ interface State { type Props = Record -export class NavList extends React.Component { +export class NavList extends Component { constructor(props: Props) { super(props) this.state = { menu: null } diff --git a/labware-library/src/components/website-navigation/NavMenu.tsx b/labware-library/src/components/website-navigation/NavMenu.tsx index 8d1d9d1326b..744919bd6b8 100644 --- a/labware-library/src/components/website-navigation/NavMenu.tsx +++ b/labware-library/src/components/website-navigation/NavMenu.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { NavLink } from './NavLink' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/ProductMenu.tsx b/labware-library/src/components/website-navigation/ProductMenu.tsx index 6548c84e3ee..a4555921ef3 100644 --- a/labware-library/src/components/website-navigation/ProductMenu.tsx +++ b/labware-library/src/components/website-navigation/ProductMenu.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styles from './styles.module.css' import { NavLink } from './NavLink' import { diff --git a/labware-library/src/components/website-navigation/ProductMobileContent.tsx b/labware-library/src/components/website-navigation/ProductMobileContent.tsx index 1141e772c0c..d8b6a528c3f 100644 --- a/labware-library/src/components/website-navigation/ProductMobileContent.tsx +++ b/labware-library/src/components/website-navigation/ProductMobileContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { NavLink } from './NavLink' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/ProtocolMenu.tsx b/labware-library/src/components/website-navigation/ProtocolMenu.tsx index 70a06bda22b..0587559bcdc 100644 --- a/labware-library/src/components/website-navigation/ProtocolMenu.tsx +++ b/labware-library/src/components/website-navigation/ProtocolMenu.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styles from './styles.module.css' import { NavLink } from './NavLink' import { protocolLinkProps } from './nav-data' diff --git a/labware-library/src/components/website-navigation/ProtocolMobileContent.tsx b/labware-library/src/components/website-navigation/ProtocolMobileContent.tsx index 689e480bdf8..6879bd2cd67 100644 --- a/labware-library/src/components/website-navigation/ProtocolMobileContent.tsx +++ b/labware-library/src/components/website-navigation/ProtocolMobileContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import map from 'lodash/map' import { NavLink } from './NavLink' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/SubdomainNav.tsx b/labware-library/src/components/website-navigation/SubdomainNav.tsx index 3ead4c09efd..43ae4db87c7 100644 --- a/labware-library/src/components/website-navigation/SubdomainNav.tsx +++ b/labware-library/src/components/website-navigation/SubdomainNav.tsx @@ -1,5 +1,4 @@ // top subdomain nav bar component -import * as React from 'react' import { Link } from 'react-router-dom' import { getPublicPath } from '../../public-path' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/SupportMenu.tsx b/labware-library/src/components/website-navigation/SupportMenu.tsx index 82537c75040..eeb5aaeb2bb 100644 --- a/labware-library/src/components/website-navigation/SupportMenu.tsx +++ b/labware-library/src/components/website-navigation/SupportMenu.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { NavLink, NavButton } from './NavLink' import { supportLinkProps, salesLinkProps } from './nav-data' import styles from './styles.module.css' diff --git a/labware-library/src/components/website-navigation/SupportMobileContent.tsx b/labware-library/src/components/website-navigation/SupportMobileContent.tsx index 7c12ac93307..4812de4bc3a 100644 --- a/labware-library/src/components/website-navigation/SupportMobileContent.tsx +++ b/labware-library/src/components/website-navigation/SupportMobileContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import map from 'lodash/map' import { NavLink } from './NavLink' import styles from './styles.module.css' diff --git a/labware-library/src/definitions.tsx b/labware-library/src/definitions.tsx index 7a3c8bd0e8e..bbea44f2c8d 100644 --- a/labware-library/src/definitions.tsx +++ b/labware-library/src/definitions.tsx @@ -1,6 +1,6 @@ // labware definition helpers // TODO(mc, 2019-03-18): move to shared-data? -import * as React from 'react' +import type * as React from 'react' import { useParams } from 'react-router-dom' import groupBy from 'lodash/groupBy' import uniq from 'lodash/uniq' diff --git a/labware-library/src/index.tsx b/labware-library/src/index.tsx index 7f244f10e75..2514a0e0413 100644 --- a/labware-library/src/index.tsx +++ b/labware-library/src/index.tsx @@ -1,5 +1,4 @@ // labware library entry -import * as React from 'react' import { hydrate, render } from 'react-dom' import { BrowserRouter, Route, Routes } from 'react-router-dom' diff --git a/labware-library/src/labware-creator/WizardHeader.tsx b/labware-library/src/labware-creator/WizardHeader.tsx index fc26ba08858..a447c8ce1f7 100644 --- a/labware-library/src/labware-creator/WizardHeader.tsx +++ b/labware-library/src/labware-creator/WizardHeader.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { Box, diff --git a/labware-library/src/labware-creator/__tests__/StackingOffsets.test.tsx b/labware-library/src/labware-creator/__tests__/StackingOffsets.test.tsx index 4a76e898ef9..57a36e6cac2 100644 --- a/labware-library/src/labware-creator/__tests__/StackingOffsets.test.tsx +++ b/labware-library/src/labware-creator/__tests__/StackingOffsets.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { useFormikContext } from 'formik' diff --git a/labware-library/src/labware-creator/components/ConditionalLabwareRender.tsx b/labware-library/src/labware-creator/components/ConditionalLabwareRender.tsx index 4419fde57d9..524983363f5 100644 --- a/labware-library/src/labware-creator/components/ConditionalLabwareRender.tsx +++ b/labware-library/src/labware-creator/components/ConditionalLabwareRender.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useLayoutEffect } from 'react' import { LabwareRender, LabwareOutline, @@ -35,8 +35,8 @@ const calculateViewBox = (args: { export const ConditionalLabwareRender = (props: Props): JSX.Element => { const { definition } = props - const gRef = React.useRef(null) - const [bBox, updateBBox] = React.useState( + const gRef = useRef(null) + const [bBox, updateBBox] = useState( gRef.current ? gRef.current.getBBox() : undefined ) @@ -44,7 +44,7 @@ export const ConditionalLabwareRender = (props: Props): JSX.Element => { // So we have to actually render the child to get its bounding box. After that, we re-calculate the viewBox. // Once the viewBox is re-calculated, we use setState to force a re-render. const nextBBox = gRef.current?.getBBox() - React.useLayoutEffect((): void => { + useLayoutEffect((): void => { if ( nextBBox != null && (nextBBox.width !== bBox?.width || nextBBox.height !== bBox?.height) diff --git a/labware-library/src/labware-creator/components/Dropdown.tsx b/labware-library/src/labware-creator/components/Dropdown.tsx index 003306da242..92429d69732 100644 --- a/labware-library/src/labware-creator/components/Dropdown.tsx +++ b/labware-library/src/labware-creator/components/Dropdown.tsx @@ -1,5 +1,5 @@ import cx from 'classnames' -import * as React from 'react' +import type * as React from 'react' import { Box, SelectField, diff --git a/labware-library/src/labware-creator/components/FormLevelErrorAlerts.tsx b/labware-library/src/labware-creator/components/FormLevelErrorAlerts.tsx index bf8883bfaa3..82c2c149b3e 100644 --- a/labware-library/src/labware-creator/components/FormLevelErrorAlerts.tsx +++ b/labware-library/src/labware-creator/components/FormLevelErrorAlerts.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { AlertItem } from '@opentrons/components' import { FORM_LEVEL_ERRORS } from '../formLevelValidation' import type { LabwareCreatorErrors } from '../formLevelValidation' diff --git a/labware-library/src/labware-creator/components/HeightGuidingText.tsx b/labware-library/src/labware-creator/components/HeightGuidingText.tsx index 77040f5ba3b..07a99aefe9e 100644 --- a/labware-library/src/labware-creator/components/HeightGuidingText.tsx +++ b/labware-library/src/labware-creator/components/HeightGuidingText.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import type { LabwareType } from '../fields' export const HeightGuidingText = (props: { diff --git a/labware-library/src/labware-creator/components/ImportErrorModal.tsx b/labware-library/src/labware-creator/components/ImportErrorModal.tsx index 033f6e62663..700cd36ae46 100644 --- a/labware-library/src/labware-creator/components/ImportErrorModal.tsx +++ b/labware-library/src/labware-creator/components/ImportErrorModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { AlertModal } from '@opentrons/components' import styles from '../styles.module.css' import type { ImportError, ImportErrorKey } from '../fields' diff --git a/labware-library/src/labware-creator/components/IntroCopy.tsx b/labware-library/src/labware-creator/components/IntroCopy.tsx index 5dec4ebff29..bcafe9e907c 100644 --- a/labware-library/src/labware-creator/components/IntroCopy.tsx +++ b/labware-library/src/labware-creator/components/IntroCopy.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Link } from 'react-router-dom' import { getPublicPath } from '../../public-path' import { LinkOut } from './LinkOut' diff --git a/labware-library/src/labware-creator/components/LabwareCreator.tsx b/labware-library/src/labware-creator/components/LabwareCreator.tsx index ea93fbe2b34..111d7264ec3 100644 --- a/labware-library/src/labware-creator/components/LabwareCreator.tsx +++ b/labware-library/src/labware-creator/components/LabwareCreator.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Nav, Breadcrumbs } from '../../components/Nav' import styles from './LabwareCreator.module.css' diff --git a/labware-library/src/labware-creator/components/LinkOut.tsx b/labware-library/src/labware-creator/components/LinkOut.tsx index 6d8e90e7ac5..895734ee6b8 100644 --- a/labware-library/src/labware-creator/components/LinkOut.tsx +++ b/labware-library/src/labware-creator/components/LinkOut.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' // TODO make this a component library component? interface Props { diff --git a/labware-library/src/labware-creator/components/RadioField.tsx b/labware-library/src/labware-creator/components/RadioField.tsx index 142a1d4ec06..158c50204ae 100644 --- a/labware-library/src/labware-creator/components/RadioField.tsx +++ b/labware-library/src/labware-creator/components/RadioField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Field } from 'formik' import { RadioGroup } from '@opentrons/components' import { reportFieldEdit } from '../analyticsUtils' diff --git a/labware-library/src/labware-creator/components/TextField.tsx b/labware-library/src/labware-creator/components/TextField.tsx index 6072c96651f..e18fecd5c7c 100644 --- a/labware-library/src/labware-creator/components/TextField.tsx +++ b/labware-library/src/labware-creator/components/TextField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Field } from 'formik' import { LegacyInputField } from '@opentrons/components' import { reportFieldEdit } from '../analyticsUtils' diff --git a/labware-library/src/labware-creator/components/__tests__/FormAlerts.test.tsx b/labware-library/src/labware-creator/components/__tests__/FormAlerts.test.tsx index 440c175b299..5d8cc265417 100644 --- a/labware-library/src/labware-creator/components/__tests__/FormAlerts.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/FormAlerts.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, it, expect, afterEach } from 'vitest' import { when } from 'vitest-when' import { render, screen } from '@testing-library/react' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/CreateNewDefinition.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/CreateNewDefinition.test.tsx index 09e4cde21dd..00da4e30c12 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/CreateNewDefinition.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/CreateNewDefinition.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect } from 'vitest' import { render, fireEvent } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/CustomTiprackWarning.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/CustomTiprackWarning.test.tsx index a63ecf9f6e9..72481593168 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/CustomTiprackWarning.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/CustomTiprackWarning.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import { render, screen } from '@testing-library/react' import { getDefaultFormState, getInitialStatus } from '../../../fields' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Description.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Description.test.tsx index 26607f544e7..6337aa78a5e 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Description.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Description.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { render, screen } from '@testing-library/react' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Export.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Export.test.tsx index bf0ef3301e6..1528423cc23 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Export.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Export.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { render, screen } from '@testing-library/react' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/File.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/File.test.tsx index f3756fd1b54..6af0e2d6bcd 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/File.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/File.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { render, screen } from '@testing-library/react' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Footprint.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Footprint.test.tsx index 8a578d3c7e3..69538701e16 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Footprint.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Footprint.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Grid.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Grid.test.tsx index 40a49859748..aa776ca5000 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Grid.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Grid.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import isEqual from 'lodash/isEqual' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/GridOffset.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/GridOffset.test.tsx index 9ae5b28a65f..e43e49b48ce 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/GridOffset.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/GridOffset.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import isEqual from 'lodash/isEqual' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/HandPlacedTipFit.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/HandPlacedTipFit.test.tsx index 595908aa989..e9cfd2b235d 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/HandPlacedTipFit.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/HandPlacedTipFit.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import isEqual from 'lodash/isEqual' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import { render, screen } from '@testing-library/react' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Height.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Height.test.tsx index 84296e1c4b8..acee9d95cf6 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Height.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Height.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Preview.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Preview.test.tsx index 7389010bcac..182e9c70b34 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Preview.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Preview.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Regularity.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Regularity.test.tsx index cada50867ce..4eb22ab5510 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Regularity.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Regularity.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/Volume.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/Volume.test.tsx index c0fc90b54eb..d43cc3298c4 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/Volume.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/Volume.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/WellBottomAndDepth.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/WellBottomAndDepth.test.tsx index db7c7193697..a05b00cea0a 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/WellBottomAndDepth.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/WellBottomAndDepth.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, it, expect, describe, beforeEach, afterEach } from 'vitest' import { render, screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/WellShapeAndSides.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/WellShapeAndSides.test.tsx index 74202597ee1..d2de2740d2e 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/WellShapeAndSides.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/WellShapeAndSides.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, beforeEach, afterEach, it, expect } from 'vitest' import { render, screen } from '@testing-library/react' import { when } from 'vitest-when' diff --git a/labware-library/src/labware-creator/components/__tests__/sections/WellSpacing.test.tsx b/labware-library/src/labware-creator/components/__tests__/sections/WellSpacing.test.tsx index 6cd9b77b09e..1c354988a76 100644 --- a/labware-library/src/labware-creator/components/__tests__/sections/WellSpacing.test.tsx +++ b/labware-library/src/labware-creator/components/__tests__/sections/WellSpacing.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import { when } from 'vitest-when' import { render, screen } from '@testing-library/react' diff --git a/labware-library/src/labware-creator/components/alerts/FormAlerts.tsx b/labware-library/src/labware-creator/components/alerts/FormAlerts.tsx index 1312a0f44d6..9cbe053ac21 100644 --- a/labware-library/src/labware-creator/components/alerts/FormAlerts.tsx +++ b/labware-library/src/labware-creator/components/alerts/FormAlerts.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import toPairs from 'lodash/toPairs' import pick from 'lodash/pick' import { AlertItem } from '@opentrons/components' diff --git a/labware-library/src/labware-creator/components/alerts/HeightAlerts.tsx b/labware-library/src/labware-creator/components/alerts/HeightAlerts.tsx index 98f00c67fc3..acd9179898d 100644 --- a/labware-library/src/labware-creator/components/alerts/HeightAlerts.tsx +++ b/labware-library/src/labware-creator/components/alerts/HeightAlerts.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { AlertItem } from '@opentrons/components' import { MAX_SUGGESTED_Z } from '../../fields' import type { FormikTouched } from 'formik' diff --git a/labware-library/src/labware-creator/components/alerts/TipFitAlerts.tsx b/labware-library/src/labware-creator/components/alerts/TipFitAlerts.tsx index a4fdfb1ec19..cf3531e2233 100644 --- a/labware-library/src/labware-creator/components/alerts/TipFitAlerts.tsx +++ b/labware-library/src/labware-creator/components/alerts/TipFitAlerts.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { AlertItem } from '@opentrons/components' import type { FormikTouched } from 'formik' import type { LabwareFields } from '../../fields' diff --git a/labware-library/src/labware-creator/components/alerts/XYDimensionAlerts.tsx b/labware-library/src/labware-creator/components/alerts/XYDimensionAlerts.tsx index 5c9fcdd704f..b987034c06c 100644 --- a/labware-library/src/labware-creator/components/alerts/XYDimensionAlerts.tsx +++ b/labware-library/src/labware-creator/components/alerts/XYDimensionAlerts.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { AlertItem } from '@opentrons/components' import { SUGGESTED_X, diff --git a/labware-library/src/labware-creator/components/diagrams/index.tsx b/labware-library/src/labware-creator/components/diagrams/index.tsx index 9687fb18401..10668b17f17 100644 --- a/labware-library/src/labware-creator/components/diagrams/index.tsx +++ b/labware-library/src/labware-creator/components/diagrams/index.tsx @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -import * as React from 'react' import heightPlateAndReservoirImage from '../../images/height_plate-and-reservoir.svg' import heightTubeRackImage from '../../images/height_tubeRack.svg' import heightAluminumBlockTubesImage from '../../images/height_aluminumBlock_tubes.svg' diff --git a/labware-library/src/labware-creator/components/optionsWithImages/index.tsx b/labware-library/src/labware-creator/components/optionsWithImages/index.tsx index 64dec81afe4..b66a3c81fe6 100644 --- a/labware-library/src/labware-creator/components/optionsWithImages/index.tsx +++ b/labware-library/src/labware-creator/components/optionsWithImages/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { wellBottomShapeOptions, wellShapeOptions } from '../../fields' import type { Options } from '../../fields' import styles from './optionsWithImages.module.css' diff --git a/labware-library/src/labware-creator/components/sections/CreateNewDefinition.tsx b/labware-library/src/labware-creator/components/sections/CreateNewDefinition.tsx index b50dc69693a..a3ffa5d7fde 100644 --- a/labware-library/src/labware-creator/components/sections/CreateNewDefinition.tsx +++ b/labware-library/src/labware-creator/components/sections/CreateNewDefinition.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import cx from 'classnames' import { PrimaryButton } from '@opentrons/components' diff --git a/labware-library/src/labware-creator/components/sections/CustomTiprackWarning.tsx b/labware-library/src/labware-creator/components/sections/CustomTiprackWarning.tsx index f623cf218fd..43cde19c634 100644 --- a/labware-library/src/labware-creator/components/sections/CustomTiprackWarning.tsx +++ b/labware-library/src/labware-creator/components/sections/CustomTiprackWarning.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { SectionBody } from './SectionBody' import styles from '../../styles.module.css' diff --git a/labware-library/src/labware-creator/components/sections/Description.tsx b/labware-library/src/labware-creator/components/sections/Description.tsx index 7d5c7e12d84..f27a3a005fe 100644 --- a/labware-library/src/labware-creator/components/sections/Description.tsx +++ b/labware-library/src/labware-creator/components/sections/Description.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { isEveryFieldHidden } from '../../utils' import { getIsOpentronsTubeRack } from '../../utils/getIsOpentronsTubeRack' diff --git a/labware-library/src/labware-creator/components/sections/Export.tsx b/labware-library/src/labware-creator/components/sections/Export.tsx index e3d00b65409..c947eeccb8a 100644 --- a/labware-library/src/labware-creator/components/sections/Export.tsx +++ b/labware-library/src/labware-creator/components/sections/Export.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { PrimaryButton } from '@opentrons/components' import styles from '../../styles.module.css' diff --git a/labware-library/src/labware-creator/components/sections/File.tsx b/labware-library/src/labware-creator/components/sections/File.tsx index e54b4c0111f..d5b9fde9e9d 100644 --- a/labware-library/src/labware-creator/components/sections/File.tsx +++ b/labware-library/src/labware-creator/components/sections/File.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { maskLoadName } from '../../fieldMasks' import { getDefaultDisplayName, getDefaultLoadName } from '../../formSelectors' diff --git a/labware-library/src/labware-creator/components/sections/Footprint.tsx b/labware-library/src/labware-creator/components/sections/Footprint.tsx index 6564a20eed7..81492309de3 100644 --- a/labware-library/src/labware-creator/components/sections/Footprint.tsx +++ b/labware-library/src/labware-creator/components/sections/Footprint.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { makeMaskToDecimal } from '../../fieldMasks' import { isEveryFieldHidden } from '../../utils' diff --git a/labware-library/src/labware-creator/components/sections/Grid.tsx b/labware-library/src/labware-creator/components/sections/Grid.tsx index 067297a2bad..3945d09d563 100644 --- a/labware-library/src/labware-creator/components/sections/Grid.tsx +++ b/labware-library/src/labware-creator/components/sections/Grid.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { maskToInteger } from '../../fieldMasks' import { isEveryFieldHidden, getLabwareName } from '../../utils' diff --git a/labware-library/src/labware-creator/components/sections/GridOffset.tsx b/labware-library/src/labware-creator/components/sections/GridOffset.tsx index 8bc13c0bfae..ad6853c7404 100644 --- a/labware-library/src/labware-creator/components/sections/GridOffset.tsx +++ b/labware-library/src/labware-creator/components/sections/GridOffset.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { makeMaskToDecimal } from '../../fieldMasks' import { isEveryFieldHidden, getLabwareName } from '../../utils' diff --git a/labware-library/src/labware-creator/components/sections/HandPlacedTipFit.tsx b/labware-library/src/labware-creator/components/sections/HandPlacedTipFit.tsx index c0c142f9c5d..a6aa8067c2c 100644 --- a/labware-library/src/labware-creator/components/sections/HandPlacedTipFit.tsx +++ b/labware-library/src/labware-creator/components/sections/HandPlacedTipFit.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { snugLooseOptions } from '../../fields' import { FormAlerts } from '../alerts/FormAlerts' diff --git a/labware-library/src/labware-creator/components/sections/Height.tsx b/labware-library/src/labware-creator/components/sections/Height.tsx index a56256a38ef..0d3d1527dfa 100644 --- a/labware-library/src/labware-creator/components/sections/Height.tsx +++ b/labware-library/src/labware-creator/components/sections/Height.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { isEveryFieldHidden } from '../../utils' import { makeMaskToDecimal } from '../../fieldMasks' diff --git a/labware-library/src/labware-creator/components/sections/Preview.tsx b/labware-library/src/labware-creator/components/sections/Preview.tsx index f06a120fb92..25bf2af5258 100644 --- a/labware-library/src/labware-creator/components/sections/Preview.tsx +++ b/labware-library/src/labware-creator/components/sections/Preview.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { getLabwareName } from '../../utils' import { ConditionalLabwareRender } from '../ConditionalLabwareRender' diff --git a/labware-library/src/labware-creator/components/sections/Regularity.tsx b/labware-library/src/labware-creator/components/sections/Regularity.tsx index 31cf78cff55..cd7fe394e21 100644 --- a/labware-library/src/labware-creator/components/sections/Regularity.tsx +++ b/labware-library/src/labware-creator/components/sections/Regularity.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { isEveryFieldHidden } from '../../utils' import { yesNoOptions } from '../../fields' diff --git a/labware-library/src/labware-creator/components/sections/SectionBody.tsx b/labware-library/src/labware-creator/components/sections/SectionBody.tsx index 03f781a9ec7..6d44aafaf31 100644 --- a/labware-library/src/labware-creator/components/sections/SectionBody.tsx +++ b/labware-library/src/labware-creator/components/sections/SectionBody.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styles from './SectionBody.module.css' interface Props { diff --git a/labware-library/src/labware-creator/components/sections/StackingOffsets.tsx b/labware-library/src/labware-creator/components/sections/StackingOffsets.tsx index 58b3b947f27..ab3c189d76b 100644 --- a/labware-library/src/labware-creator/components/sections/StackingOffsets.tsx +++ b/labware-library/src/labware-creator/components/sections/StackingOffsets.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { MAGNETIC_BLOCK_V1, diff --git a/labware-library/src/labware-creator/components/sections/UploadExisting.tsx b/labware-library/src/labware-creator/components/sections/UploadExisting.tsx index 579d52c44d1..c98f0fa3314 100644 --- a/labware-library/src/labware-creator/components/sections/UploadExisting.tsx +++ b/labware-library/src/labware-creator/components/sections/UploadExisting.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { PrimaryButton } from '@opentrons/components' import { ImportLabware } from '../ImportLabware' import styles from '../../styles.module.css' diff --git a/labware-library/src/labware-creator/components/sections/Volume.tsx b/labware-library/src/labware-creator/components/sections/Volume.tsx index c8ad8d4c34b..536c86b23e4 100644 --- a/labware-library/src/labware-creator/components/sections/Volume.tsx +++ b/labware-library/src/labware-creator/components/sections/Volume.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import { isEveryFieldHidden, getLabwareName } from '../../utils' import { makeMaskToDecimal } from '../../fieldMasks' diff --git a/labware-library/src/labware-creator/components/sections/WellBottomAndDepth.tsx b/labware-library/src/labware-creator/components/sections/WellBottomAndDepth.tsx index d27e1f6a23f..15823f62536 100644 --- a/labware-library/src/labware-creator/components/sections/WellBottomAndDepth.tsx +++ b/labware-library/src/labware-creator/components/sections/WellBottomAndDepth.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import capitalize from 'lodash/capitalize' import { useFormikContext } from 'formik' import { makeMaskToDecimal } from '../../fieldMasks' diff --git a/labware-library/src/labware-creator/components/sections/WellShapeAndSides.tsx b/labware-library/src/labware-creator/components/sections/WellShapeAndSides.tsx index 23b8362cef3..03722def3a6 100644 --- a/labware-library/src/labware-creator/components/sections/WellShapeAndSides.tsx +++ b/labware-library/src/labware-creator/components/sections/WellShapeAndSides.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import capitalize from 'lodash/capitalize' import { makeMaskToDecimal } from '../../fieldMasks' diff --git a/labware-library/src/labware-creator/components/sections/WellSpacing.tsx b/labware-library/src/labware-creator/components/sections/WellSpacing.tsx index 05c473dd9e3..b8555e838d2 100644 --- a/labware-library/src/labware-creator/components/sections/WellSpacing.tsx +++ b/labware-library/src/labware-creator/components/sections/WellSpacing.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useFormikContext } from 'formik' import capitalize from 'lodash/capitalize' import { makeMaskToDecimal } from '../../fieldMasks' diff --git a/labware-library/src/labware-creator/components/utils/wrapInFormik.tsx b/labware-library/src/labware-creator/components/utils/wrapInFormik.tsx index 4c8bf123ece..d6609056fd3 100644 --- a/labware-library/src/labware-creator/components/utils/wrapInFormik.tsx +++ b/labware-library/src/labware-creator/components/utils/wrapInFormik.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Formik } from 'formik' import type { FormikConfig } from 'formik' diff --git a/opentrons-ai-client/src/App.test.tsx b/opentrons-ai-client/src/App.test.tsx index 94d7e07de3a..859bb488f0e 100644 --- a/opentrons-ai-client/src/App.test.tsx +++ b/opentrons-ai-client/src/App.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import * as auth0 from '@auth0/auth0-react' diff --git a/opentrons-ai-client/src/App.tsx b/opentrons-ai-client/src/App.tsx index 2a7420b5bc7..263ea02c844 100644 --- a/opentrons-ai-client/src/App.tsx +++ b/opentrons-ai-client/src/App.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect } from 'react' import { useAuth0 } from '@auth0/auth0-react' import { useTranslation } from 'react-i18next' import { useForm, FormProvider } from 'react-hook-form' @@ -42,7 +42,7 @@ export function App(): JSX.Element | null { }, }) - React.useEffect(() => { + useEffect(() => { if (!isAuthenticated && !isLoading) { void loginWithRedirect() } diff --git a/opentrons-ai-client/src/__testing-utils__/renderWithProviders.tsx b/opentrons-ai-client/src/__testing-utils__/renderWithProviders.tsx index e02ecb50de1..f551c875d9c 100644 --- a/opentrons-ai-client/src/__testing-utils__/renderWithProviders.tsx +++ b/opentrons-ai-client/src/__testing-utils__/renderWithProviders.tsx @@ -1,6 +1,6 @@ // render using targetted component using @testing-library/react // with wrapping providers for i18next and redux -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { I18nextProvider } from 'react-i18next' import { Provider } from 'react-redux' diff --git a/opentrons-ai-client/src/atoms/SendButton/__tests__/SendButton.test.tsx b/opentrons-ai-client/src/atoms/SendButton/__tests__/SendButton.test.tsx index dcf90ec1022..e2035a32189 100644 --- a/opentrons-ai-client/src/atoms/SendButton/__tests__/SendButton.test.tsx +++ b/opentrons-ai-client/src/atoms/SendButton/__tests__/SendButton.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/opentrons-ai-client/src/atoms/SendButton/index.tsx b/opentrons-ai-client/src/atoms/SendButton/index.tsx index e165762b2ab..2a0079d21d6 100644 --- a/opentrons-ai-client/src/atoms/SendButton/index.tsx +++ b/opentrons-ai-client/src/atoms/SendButton/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { css } from 'styled-components' import { diff --git a/opentrons-ai-client/src/main.tsx b/opentrons-ai-client/src/main.tsx index c23ea735b19..11f4aa0ff09 100644 --- a/opentrons-ai-client/src/main.tsx +++ b/opentrons-ai-client/src/main.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { StrictMode } from 'react' import ReactDOM from 'react-dom/client' import { I18nextProvider } from 'react-i18next' import { Auth0Provider } from '@auth0/auth0-react' @@ -38,7 +38,7 @@ if (rootElement != null) { const domain = getDomain() ReactDOM.createRoot(rootElement).render( - + - + ) } else { console.error('Root element not found') diff --git a/opentrons-ai-client/src/molecules/ChatDisplay/ChatDisplay.stories.tsx b/opentrons-ai-client/src/molecules/ChatDisplay/ChatDisplay.stories.tsx index e3e0a1a6f36..7a068db05b9 100644 --- a/opentrons-ai-client/src/molecules/ChatDisplay/ChatDisplay.stories.tsx +++ b/opentrons-ai-client/src/molecules/ChatDisplay/ChatDisplay.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { I18nextProvider } from 'react-i18next' import { COLORS, Flex, SPACING } from '@opentrons/components' import { i18n } from '../../i18n' diff --git a/opentrons-ai-client/src/molecules/ChatDisplay/__tests__/ChatDisplay.test.tsx b/opentrons-ai-client/src/molecules/ChatDisplay/__tests__/ChatDisplay.test.tsx index 0c51b7771f2..afec6d800cc 100644 --- a/opentrons-ai-client/src/molecules/ChatDisplay/__tests__/ChatDisplay.test.tsx +++ b/opentrons-ai-client/src/molecules/ChatDisplay/__tests__/ChatDisplay.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, beforeEach } from 'vitest' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/opentrons-ai-client/src/molecules/ChatDisplay/index.tsx b/opentrons-ai-client/src/molecules/ChatDisplay/index.tsx index b92c5745163..4eaa840dbcb 100644 --- a/opentrons-ai-client/src/molecules/ChatDisplay/index.tsx +++ b/opentrons-ai-client/src/molecules/ChatDisplay/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useState } from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import Markdown from 'react-markdown' @@ -29,7 +29,7 @@ interface ChatDisplayProps { export function ChatDisplay({ chat, chatId }: ChatDisplayProps): JSX.Element { const { t } = useTranslation('protocol_generator') - const [isCopied, setIsCopied] = React.useState(false) + const [isCopied, setIsCopied] = useState(false) const { role, reply } = chat const isUser = role === 'user' diff --git a/opentrons-ai-client/src/molecules/ChatFooter/__tests__/ChatFooter.test.tsx b/opentrons-ai-client/src/molecules/ChatFooter/__tests__/ChatFooter.test.tsx index 9556a3b8a19..ab810469567 100644 --- a/opentrons-ai-client/src/molecules/ChatFooter/__tests__/ChatFooter.test.tsx +++ b/opentrons-ai-client/src/molecules/ChatFooter/__tests__/ChatFooter.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/opentrons-ai-client/src/molecules/ChatFooter/index.tsx b/opentrons-ai-client/src/molecules/ChatFooter/index.tsx index ae1653c0708..b477da1dacd 100644 --- a/opentrons-ai-client/src/molecules/ChatFooter/index.tsx +++ b/opentrons-ai-client/src/molecules/ChatFooter/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/opentrons-ai-client/src/molecules/InputPrompt/__tests__/InputPrompt.test.tsx b/opentrons-ai-client/src/molecules/InputPrompt/__tests__/InputPrompt.test.tsx index 7f8b4fab8f2..f6f588aeab7 100644 --- a/opentrons-ai-client/src/molecules/InputPrompt/__tests__/InputPrompt.test.tsx +++ b/opentrons-ai-client/src/molecules/InputPrompt/__tests__/InputPrompt.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { describe, it, expect } from 'vitest' import { FormProvider, useForm } from 'react-hook-form' import { fireEvent, screen } from '@testing-library/react' diff --git a/opentrons-ai-client/src/molecules/InputPrompt/index.tsx b/opentrons-ai-client/src/molecules/InputPrompt/index.tsx index 8a8ad009694..d4c4cdf5f8d 100644 --- a/opentrons-ai-client/src/molecules/InputPrompt/index.tsx +++ b/opentrons-ai-client/src/molecules/InputPrompt/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { useFormContext } from 'react-hook-form' @@ -33,7 +33,7 @@ export function InputPrompt(): JSX.Element { const [, setChatData] = useAtom(chatDataAtom) const [chatHistory, setChatHistory] = useAtom(chatHistoryAtom) const [token] = useAtom(tokenAtom) - const [submitted, setSubmitted] = React.useState(false) + const [submitted, setSubmitted] = useState(false) const userPrompt = watch('userPrompt') ?? '' const { data, isLoading, callApi } = useApiCall() @@ -86,7 +86,7 @@ export function InputPrompt(): JSX.Element { } } - React.useEffect(() => { + useEffect(() => { if (submitted && data != null && !isLoading) { const { role, reply } = data as ChatData const assistantResponse: ChatData = { diff --git a/opentrons-ai-client/src/molecules/Loading/index.tsx b/opentrons-ai-client/src/molecules/Loading/index.tsx index 9da42aaf3fb..1f654b3706e 100644 --- a/opentrons-ai-client/src/molecules/Loading/index.tsx +++ b/opentrons-ai-client/src/molecules/Loading/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { useTranslation } from 'react-i18next' import { ALIGN_CENTER, diff --git a/opentrons-ai-client/src/molecules/PrimaryFloatingButton/PrimaryFloatingButton.stories.tsx b/opentrons-ai-client/src/molecules/PrimaryFloatingButton/PrimaryFloatingButton.stories.tsx index 6ab1620badf..0bf83e8cdf0 100644 --- a/opentrons-ai-client/src/molecules/PrimaryFloatingButton/PrimaryFloatingButton.stories.tsx +++ b/opentrons-ai-client/src/molecules/PrimaryFloatingButton/PrimaryFloatingButton.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { PrimaryFloatingButton as PrimaryFloatingButtonComponent } from './index' import type { Meta, StoryObj } from '@storybook/react' diff --git a/opentrons-ai-client/src/molecules/PrimaryFloatingButton/__tests__/PrimaryFloatingButton.test.tsx b/opentrons-ai-client/src/molecules/PrimaryFloatingButton/__tests__/PrimaryFloatingButton.test.tsx index 7e5316a3805..8cb297f7501 100644 --- a/opentrons-ai-client/src/molecules/PrimaryFloatingButton/__tests__/PrimaryFloatingButton.test.tsx +++ b/opentrons-ai-client/src/molecules/PrimaryFloatingButton/__tests__/PrimaryFloatingButton.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { BORDERS, COLORS, TYPOGRAPHY, SPACING } from '@opentrons/components' diff --git a/opentrons-ai-client/src/molecules/PrimaryFloatingButton/index.tsx b/opentrons-ai-client/src/molecules/PrimaryFloatingButton/index.tsx index fd5a11a6fbc..ea1aef51456 100644 --- a/opentrons-ai-client/src/molecules/PrimaryFloatingButton/index.tsx +++ b/opentrons-ai-client/src/molecules/PrimaryFloatingButton/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/opentrons-ai-client/src/molecules/PromptGuide/PromptGuide.stories.tsx b/opentrons-ai-client/src/molecules/PromptGuide/PromptGuide.stories.tsx index 1a29b80c709..79b1cbc03b8 100644 --- a/opentrons-ai-client/src/molecules/PromptGuide/PromptGuide.stories.tsx +++ b/opentrons-ai-client/src/molecules/PromptGuide/PromptGuide.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { I18nextProvider } from 'react-i18next' import { i18n } from '../../i18n' import { PromptGuide as PromptGuideComponent } from './index' diff --git a/opentrons-ai-client/src/molecules/PromptGuide/__tests__/PromptGuide.test.tsx b/opentrons-ai-client/src/molecules/PromptGuide/__tests__/PromptGuide.test.tsx index 5c2a85fb902..73d19d1087b 100644 --- a/opentrons-ai-client/src/molecules/PromptGuide/__tests__/PromptGuide.test.tsx +++ b/opentrons-ai-client/src/molecules/PromptGuide/__tests__/PromptGuide.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { describe, it, expect } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/opentrons-ai-client/src/molecules/PromptGuide/index.tsx b/opentrons-ai-client/src/molecules/PromptGuide/index.tsx index a7b76694911..27f03284e00 100644 --- a/opentrons-ai-client/src/molecules/PromptGuide/index.tsx +++ b/opentrons-ai-client/src/molecules/PromptGuide/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { Trans, useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { diff --git a/opentrons-ai-client/src/molecules/SidePanel/SidePanel.stories.tsx b/opentrons-ai-client/src/molecules/SidePanel/SidePanel.stories.tsx index 1c1d30b7548..828f4f1cd0f 100644 --- a/opentrons-ai-client/src/molecules/SidePanel/SidePanel.stories.tsx +++ b/opentrons-ai-client/src/molecules/SidePanel/SidePanel.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { I18nextProvider } from 'react-i18next' import { i18n } from '../../i18n' import { SidePanel as SidePanelComponent } from './index' diff --git a/opentrons-ai-client/src/molecules/SidePanel/__tests__/SidePanel.test.tsx b/opentrons-ai-client/src/molecules/SidePanel/__tests__/SidePanel.test.tsx index 230f9642849..0528308b6de 100644 --- a/opentrons-ai-client/src/molecules/SidePanel/__tests__/SidePanel.test.tsx +++ b/opentrons-ai-client/src/molecules/SidePanel/__tests__/SidePanel.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { useFormContext } from 'react-hook-form' diff --git a/opentrons-ai-client/src/molecules/SidePanel/index.tsx b/opentrons-ai-client/src/molecules/SidePanel/index.tsx index da56e89b53f..b93135e92a5 100644 --- a/opentrons-ai-client/src/molecules/SidePanel/index.tsx +++ b/opentrons-ai-client/src/molecules/SidePanel/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import styled, { css } from 'styled-components' import { useTranslation } from 'react-i18next' import { diff --git a/opentrons-ai-client/src/organisms/MainContentContainer/MainContainer.stories.tsx b/opentrons-ai-client/src/organisms/MainContentContainer/MainContainer.stories.tsx index de18817f0aa..4f8fe5739fd 100644 --- a/opentrons-ai-client/src/organisms/MainContentContainer/MainContainer.stories.tsx +++ b/opentrons-ai-client/src/organisms/MainContentContainer/MainContainer.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { I18nextProvider } from 'react-i18next' import { i18n } from '../../i18n' import { MainContentContainer as MainContentContainerComponent } from './index' diff --git a/opentrons-ai-client/src/organisms/MainContentContainer/__tests__/MainContentContainer.test.tsx b/opentrons-ai-client/src/organisms/MainContentContainer/__tests__/MainContentContainer.test.tsx index ec38062d502..4598eddc49e 100644 --- a/opentrons-ai-client/src/organisms/MainContentContainer/__tests__/MainContentContainer.test.tsx +++ b/opentrons-ai-client/src/organisms/MainContentContainer/__tests__/MainContentContainer.test.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/opentrons-ai-client/src/organisms/MainContentContainer/index.tsx b/opentrons-ai-client/src/organisms/MainContentContainer/index.tsx index 6cd42e698c3..b5b495a691e 100644 --- a/opentrons-ai-client/src/organisms/MainContentContainer/index.tsx +++ b/opentrons-ai-client/src/organisms/MainContentContainer/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useRef, useEffect } from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { useAtom } from 'jotai' @@ -19,9 +19,9 @@ import { chatDataAtom } from '../../resources/atoms' export function MainContentContainer(): JSX.Element { const { t } = useTranslation('protocol_generator') const [chatData] = useAtom(chatDataAtom) - const scrollRef = React.useRef(null) + const scrollRef = useRef(null) - React.useEffect(() => { + useEffect(() => { if (scrollRef.current != null) scrollRef.current.scrollIntoView({ behavior: 'smooth', diff --git a/opentrons-ai-client/src/organisms/PromptButton/PromptButton.stories.tsx b/opentrons-ai-client/src/organisms/PromptButton/PromptButton.stories.tsx index f300b302393..b0777ce5970 100644 --- a/opentrons-ai-client/src/organisms/PromptButton/PromptButton.stories.tsx +++ b/opentrons-ai-client/src/organisms/PromptButton/PromptButton.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { PromptButton as PromptButtonComponent } from '.' import type { Meta, StoryObj } from '@storybook/react' diff --git a/opentrons-ai-client/src/organisms/PromptButton/__tests__/PromptButton.test.tsx b/opentrons-ai-client/src/organisms/PromptButton/__tests__/PromptButton.test.tsx index ad7bbdb891a..5d9ec302131 100644 --- a/opentrons-ai-client/src/organisms/PromptButton/__tests__/PromptButton.test.tsx +++ b/opentrons-ai-client/src/organisms/PromptButton/__tests__/PromptButton.test.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, beforeEach, expect, vi } from 'vitest' diff --git a/opentrons-ai-client/src/organisms/PromptButton/index.tsx b/opentrons-ai-client/src/organisms/PromptButton/index.tsx index 4e3fe0c1e36..cecbfd99108 100644 --- a/opentrons-ai-client/src/organisms/PromptButton/index.tsx +++ b/opentrons-ai-client/src/organisms/PromptButton/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import styled from 'styled-components' import { BORDERS, PrimaryButton } from '@opentrons/components' import { diff --git a/protocol-designer/src/App.tsx b/protocol-designer/src/App.tsx index 7699de60ce2..165a5488ed4 100644 --- a/protocol-designer/src/App.tsx +++ b/protocol-designer/src/App.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { ProtocolEditor } from './ProtocolEditor' export function App(): JSX.Element { diff --git a/protocol-designer/src/NavigationBar.tsx b/protocol-designer/src/NavigationBar.tsx index 2099f41f957..17aa3ff164e 100644 --- a/protocol-designer/src/NavigationBar.tsx +++ b/protocol-designer/src/NavigationBar.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useLocation, useNavigate } from 'react-router-dom' import styled from 'styled-components' import { useDispatch, useSelector } from 'react-redux' diff --git a/protocol-designer/src/ProtocolEditor.tsx b/protocol-designer/src/ProtocolEditor.tsx index cee77d144d7..570b27da6b6 100644 --- a/protocol-designer/src/ProtocolEditor.tsx +++ b/protocol-designer/src/ProtocolEditor.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { DndProvider } from 'react-dnd' import { HashRouter } from 'react-router-dom' diff --git a/protocol-designer/src/ProtocolRoutes.tsx b/protocol-designer/src/ProtocolRoutes.tsx index 6917f4ef69f..e2766b34c14 100644 --- a/protocol-designer/src/ProtocolRoutes.tsx +++ b/protocol-designer/src/ProtocolRoutes.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Route, Navigate, Routes } from 'react-router-dom' import { Box } from '@opentrons/components' import { Landing } from './pages/Landing' diff --git a/protocol-designer/src/__testing-utils__/renderWithProviders.tsx b/protocol-designer/src/__testing-utils__/renderWithProviders.tsx index 65a2e01855e..11e3ba16d9b 100644 --- a/protocol-designer/src/__testing-utils__/renderWithProviders.tsx +++ b/protocol-designer/src/__testing-utils__/renderWithProviders.tsx @@ -1,6 +1,6 @@ // render using targetted component using @testing-library/react // with wrapping providers for i18next and redux -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' import { I18nextProvider } from 'react-i18next' import { Provider } from 'react-redux' diff --git a/protocol-designer/src/__tests__/NavigationBar.test.tsx b/protocol-designer/src/__tests__/NavigationBar.test.tsx index 322181be251..c51e17e03ee 100644 --- a/protocol-designer/src/__tests__/NavigationBar.test.tsx +++ b/protocol-designer/src/__tests__/NavigationBar.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { MemoryRouter } from 'react-router-dom' diff --git a/protocol-designer/src/components/BatchEditForm/BatchEditMix.tsx b/protocol-designer/src/components/BatchEditForm/BatchEditMix.tsx index 1fbf57177d1..d7bc4c2f32d 100644 --- a/protocol-designer/src/components/BatchEditForm/BatchEditMix.tsx +++ b/protocol-designer/src/components/BatchEditForm/BatchEditMix.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Box, diff --git a/protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx b/protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx index dbabb185051..7a0363b6e8c 100644 --- a/protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx +++ b/protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Box, diff --git a/protocol-designer/src/components/BatchEditForm/FormColumn.tsx b/protocol-designer/src/components/BatchEditForm/FormColumn.tsx index eaeb6e12225..684c7654fbb 100644 --- a/protocol-designer/src/components/BatchEditForm/FormColumn.tsx +++ b/protocol-designer/src/components/BatchEditForm/FormColumn.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Box } from '@opentrons/components' // TODO(IL, 2021-03-01): refactor these fragmented style rules (see #7402) import styles from '../StepEditForm/StepEditForm.module.css' diff --git a/protocol-designer/src/components/BatchEditForm/NoBatchEditSharedSettings.tsx b/protocol-designer/src/components/BatchEditForm/NoBatchEditSharedSettings.tsx index 27d16c7387b..326733c6192 100644 --- a/protocol-designer/src/components/BatchEditForm/NoBatchEditSharedSettings.tsx +++ b/protocol-designer/src/components/BatchEditForm/NoBatchEditSharedSettings.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Flex, diff --git a/protocol-designer/src/components/BatchEditForm/index.tsx b/protocol-designer/src/components/BatchEditForm/index.tsx index 71de584a43d..9d77fd5f6c3 100644 --- a/protocol-designer/src/components/BatchEditForm/index.tsx +++ b/protocol-designer/src/components/BatchEditForm/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { makeBatchEditFieldProps } from './makeBatchEditFieldProps' diff --git a/protocol-designer/src/components/ColorPicker/index.tsx b/protocol-designer/src/components/ColorPicker/index.tsx index 29c0de80691..7b8ee199ab2 100644 --- a/protocol-designer/src/components/ColorPicker/index.tsx +++ b/protocol-designer/src/components/ColorPicker/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import cx from 'classnames' import { TwitterPicker } from 'react-color' import { DEFAULT_LIQUID_COLORS } from '@opentrons/shared-data' @@ -13,7 +13,7 @@ interface ColorPickerProps { export function ColorPicker(props: ColorPickerProps): JSX.Element { const { value, onChange } = props - const [showColorPicker, setShowColorPicker] = React.useState(false) + const [showColorPicker, setShowColorPicker] = useState(false) return ( <> diff --git a/protocol-designer/src/components/ComputingSpinner.tsx b/protocol-designer/src/components/ComputingSpinner.tsx index 921295f27a5..71c8b527f91 100644 --- a/protocol-designer/src/components/ComputingSpinner.tsx +++ b/protocol-designer/src/components/ComputingSpinner.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { css } from 'styled-components' import { Box, CURSOR_WAIT, POSITION_FIXED } from '@opentrons/components' diff --git a/protocol-designer/src/components/DeckSetup/FlexModuleTag.tsx b/protocol-designer/src/components/DeckSetup/FlexModuleTag.tsx index 729b8d63145..9c5ba9fc7c5 100644 --- a/protocol-designer/src/components/DeckSetup/FlexModuleTag.tsx +++ b/protocol-designer/src/components/DeckSetup/FlexModuleTag.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { RobotCoordsForeignDiv, Text, diff --git a/protocol-designer/src/components/DeckSetup/LabwareOnDeck.tsx b/protocol-designer/src/components/DeckSetup/LabwareOnDeck.tsx index e36272d4ada..fe9b0da22b6 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOnDeck.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOnDeck.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { LabwareRender } from '@opentrons/components' diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/AdapterControls.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/AdapterControls.tsx index 44da52c8787..3be204f8fd7 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/AdapterControls.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/AdapterControls.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useDrop } from 'react-dnd' import cx from 'classnames' @@ -55,7 +55,7 @@ export const AdapterControls = ( const customLabwareDefs = useSelector( labwareDefSelectors.getCustomLabwareDefsByURI ) - const ref = React.useRef(null) + const ref = useRef(null) const dispatch = useDispatch() const adapterName = diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/BlockedSlot.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/BlockedSlot.tsx index 87a22b00d30..aabb977e2e0 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/BlockedSlot.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/BlockedSlot.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { RobotCoordsForeignDiv } from '@opentrons/components' import styles from './LabwareOverlays.module.css' diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/BrowseLabware.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/BrowseLabware.tsx index db5ac964555..06650910a53 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/BrowseLabware.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/BrowseLabware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import cx from 'classnames' import { useDispatch } from 'react-redux' diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/EditLabwareOffDeck.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/EditLabwareOffDeck.tsx index d0bef438c07..c6a5a444d0c 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/EditLabwareOffDeck.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/EditLabwareOffDeck.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareControls.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareControls.tsx index 0fba71f5c7b..1c31a962e75 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareControls.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareControls.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { RobotCoordsForeignDiv } from '@opentrons/components' diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareHighlight.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareHighlight.tsx index 320d1074977..78d0a8ada5c 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareHighlight.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareHighlight.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { useSelector } from 'react-redux' import { Icon } from '@opentrons/components' diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareName.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareName.tsx index 339e4af0176..15d07bd9886 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareName.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/LabwareName.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { LabwareNameOverlay, truncateString } from '@opentrons/components' import { getLabwareDisplayName } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/DeckSetup/LabwareOverlays/SlotControls.tsx b/protocol-designer/src/components/DeckSetup/LabwareOverlays/SlotControls.tsx index 283c8712ace..614d2fc9d55 100644 --- a/protocol-designer/src/components/DeckSetup/LabwareOverlays/SlotControls.tsx +++ b/protocol-designer/src/components/DeckSetup/LabwareOverlays/SlotControls.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import noop from 'lodash/noop' @@ -54,7 +54,7 @@ export const SlotControls = (props: SlotControlsProps): JSX.Element | null => { const customLabwareDefs = useSelector( labwareDefSelectors.getCustomLabwareDefsByURI ) - const ref = React.useRef(null) + const ref = useRef(null) const dispatch = useDispatch() const { t } = useTranslation('deck') diff --git a/protocol-designer/src/components/DeckSetup/NullDeckState.tsx b/protocol-designer/src/components/DeckSetup/NullDeckState.tsx index 1faee08dca8..f2c26f579cc 100644 --- a/protocol-designer/src/components/DeckSetup/NullDeckState.tsx +++ b/protocol-designer/src/components/DeckSetup/NullDeckState.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { getDeckDefinitions } from '@opentrons/shared-data' import { useTranslation } from 'react-i18next' import { @@ -19,7 +19,7 @@ import { DECK_LAYER_BLOCKLIST } from './index' import styles from './DeckSetup.module.css' export const NullDeckState = (): JSX.Element => { - const deckDef = React.useMemo(() => getDeckDefinitions().ot2_standard, []) + const deckDef = useMemo(() => getDeckDefinitions().ot2_standard, []) const { t } = useTranslation('deck') return (
diff --git a/protocol-designer/src/components/DeckSetup/Ot2ModuleTag.tsx b/protocol-designer/src/components/DeckSetup/Ot2ModuleTag.tsx index abb43d417f0..6c5c7d57b5c 100644 --- a/protocol-designer/src/components/DeckSetup/Ot2ModuleTag.tsx +++ b/protocol-designer/src/components/DeckSetup/Ot2ModuleTag.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { RobotCoordsForeignDiv, Text, diff --git a/protocol-designer/src/components/DeckSetup/SlotLabels.tsx b/protocol-designer/src/components/DeckSetup/SlotLabels.tsx index ffbbb73fde0..a4262ba26b9 100644 --- a/protocol-designer/src/components/DeckSetup/SlotLabels.tsx +++ b/protocol-designer/src/components/DeckSetup/SlotLabels.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' import { DeckInfoLabel, diff --git a/protocol-designer/src/components/DeckSetup/SlotWarning.tsx b/protocol-designer/src/components/DeckSetup/SlotWarning.tsx index dac3928bbc1..dbe86acbcde 100644 --- a/protocol-designer/src/components/DeckSetup/SlotWarning.tsx +++ b/protocol-designer/src/components/DeckSetup/SlotWarning.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { RobotCoordsForeignDiv, TYPOGRAPHY } from '@opentrons/components' diff --git a/protocol-designer/src/components/DeckSetup/__tests__/FlexModuleTag.test.tsx b/protocol-designer/src/components/DeckSetup/__tests__/FlexModuleTag.test.tsx index cf809a1f353..4fb9c967c5e 100644 --- a/protocol-designer/src/components/DeckSetup/__tests__/FlexModuleTag.test.tsx +++ b/protocol-designer/src/components/DeckSetup/__tests__/FlexModuleTag.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi } from 'vitest' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/components/DeckSetup/__tests__/Ot2ModuleTag.test.tsx b/protocol-designer/src/components/DeckSetup/__tests__/Ot2ModuleTag.test.tsx index 1457b473248..279855682a9 100644 --- a/protocol-designer/src/components/DeckSetup/__tests__/Ot2ModuleTag.test.tsx +++ b/protocol-designer/src/components/DeckSetup/__tests__/Ot2ModuleTag.test.tsx @@ -1,5 +1,5 @@ import { describe, it } from 'vitest' -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' import { Ot2ModuleTag } from '../Ot2ModuleTag' diff --git a/protocol-designer/src/components/DeckSetupManager.tsx b/protocol-designer/src/components/DeckSetupManager.tsx index 2c065b7a545..bbe87287b41 100644 --- a/protocol-designer/src/components/DeckSetupManager.tsx +++ b/protocol-designer/src/components/DeckSetupManager.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { getBatchEditSelectedStepTypes, diff --git a/protocol-designer/src/components/EditModules.tsx b/protocol-designer/src/components/EditModules.tsx index a62c1d97ca6..6ed7c8a6054 100644 --- a/protocol-designer/src/components/EditModules.tsx +++ b/protocol-designer/src/components/EditModules.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector, useDispatch } from 'react-redux' import { FLEX_ROBOT_TYPE, @@ -50,7 +50,7 @@ export const EditModules = (props: EditModulesProps): JSX.Element => { const [ changeModuleWarningInfo, displayModuleWarning, - ] = React.useState(null) + ] = useState(null) const dispatch = useDispatch() const editModuleModel = (selectedModel: ModuleModel): void => { diff --git a/protocol-designer/src/components/FilePage.tsx b/protocol-designer/src/components/FilePage.tsx index 59757136cb9..2167ece1071 100644 --- a/protocol-designer/src/components/FilePage.tsx +++ b/protocol-designer/src/components/FilePage.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { createPortal } from 'react-dom' import { Controller, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' @@ -46,11 +46,10 @@ export const FilePage = (): JSX.Element => { ) const modules = useSelector(stepFormSelectors.getModulesForEditModulesCard) const initialDeckSetup = useSelector(stepFormSelectors.getInitialDeckSetup) - const [ - isEditPipetteModalOpen, - setEditPipetteModalOpen, - ] = React.useState(false) - const [moduleToEdit, setModuleToEdit] = React.useState<{ + const [isEditPipetteModalOpen, setEditPipetteModalOpen] = useState( + false + ) + const [moduleToEdit, setModuleToEdit] = useState<{ moduleType: ModuleType moduleId?: string | null } | null>(null) @@ -84,7 +83,7 @@ export const FilePage = (): JSX.Element => { dispatch(actions.saveFileMetadata(nextFormValues)) setManualDirty(false) } - const [isManualDirty, setManualDirty] = React.useState(false) + const [isManualDirty, setManualDirty] = useState(false) const { handleSubmit, watch, @@ -94,7 +93,7 @@ export const FilePage = (): JSX.Element => { } = useForm({ defaultValues: formValues }) // to ensure that values from watch are up to date if the defaultValues // change - React.useEffect(() => { + useEffect(() => { setValue('protocolName', formValues.protocolName) setValue('created', formValues.created) setValue('lastModified', formValues.lastModified) diff --git a/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx b/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx index 722c0ad51bc..c8d2a7c8fe9 100644 --- a/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx +++ b/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { FLEX_ROBOT_TYPE, fixtureTiprack300ul } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/FormManager/index.tsx b/protocol-designer/src/components/FormManager/index.tsx index fa0e2b6a3f3..e0241100d94 100644 --- a/protocol-designer/src/components/FormManager/index.tsx +++ b/protocol-designer/src/components/FormManager/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { Box, POSITION_STICKY, C_SELECTED_DARK } from '@opentrons/components' import { StepEditForm } from '../StepEditForm' diff --git a/protocol-designer/src/components/Hints/index.tsx b/protocol-designer/src/components/Hints/index.tsx index a05ba52e938..cbc40cb0a97 100644 --- a/protocol-designer/src/components/Hints/index.tsx +++ b/protocol-designer/src/components/Hints/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useCallback } from 'react' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' import { useSelector, useDispatch } from 'react-redux' @@ -21,11 +21,9 @@ const HINT_IS_ALERT: HintKey[] = ['add_liquids_and_labware'] export const Hints = (): JSX.Element | null => { const { t } = useTranslation(['alert', 'nav', 'button']) - const [rememberDismissal, setRememberDismissal] = React.useState( - false - ) + const [rememberDismissal, setRememberDismissal] = useState(false) - const toggleRememberDismissal = React.useCallback(() => { + const toggleRememberDismissal = useCallback(() => { setRememberDismissal(prevDismissal => !prevDismissal) }, []) const hintKey = useSelector(selectors.getHint) diff --git a/protocol-designer/src/components/IngredientsList/LabwareDetailsCard/LabwareDetailsCard.tsx b/protocol-designer/src/components/IngredientsList/LabwareDetailsCard/LabwareDetailsCard.tsx index 46abd882ef9..80afd8f9624 100644 --- a/protocol-designer/src/components/IngredientsList/LabwareDetailsCard/LabwareDetailsCard.tsx +++ b/protocol-designer/src/components/IngredientsList/LabwareDetailsCard/LabwareDetailsCard.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import cx from 'classnames' diff --git a/protocol-designer/src/components/IngredientsList/index.tsx b/protocol-designer/src/components/IngredientsList/index.tsx index f286fa89ce1..125b81e6a10 100644 --- a/protocol-designer/src/components/IngredientsList/index.tsx +++ b/protocol-designer/src/components/IngredientsList/index.tsx @@ -1,5 +1,5 @@ // TODO: Ian 2018-10-09 figure out what belongs in LiquidsSidebar vs IngredientsList after #2427 -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { IconButton, SidePanel, truncateString } from '@opentrons/components' @@ -45,7 +45,7 @@ const LiquidGroupCard = (props: LiquidGroupCardProps): JSX.Element | null => { const { t } = useTranslation(['card', 'application']) const showName = ingredGroup.serialize - const [expanded, setExpanded] = React.useState(true) + const [expanded, setExpanded] = useState(true) const toggleAccordion = (): void => { setExpanded(!expanded) diff --git a/protocol-designer/src/components/KnowledgeBaseLink/index.tsx b/protocol-designer/src/components/KnowledgeBaseLink/index.tsx index 693c09d23a5..a21f8a0fc6d 100644 --- a/protocol-designer/src/components/KnowledgeBaseLink/index.tsx +++ b/protocol-designer/src/components/KnowledgeBaseLink/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Link } from '@opentrons/components' export const KNOWLEDGEBASE_ROOT_URL = diff --git a/protocol-designer/src/components/LabwareSelectionModal/LabwareItem.tsx b/protocol-designer/src/components/LabwareSelectionModal/LabwareItem.tsx index bf745ae524c..33ba3393765 100644 --- a/protocol-designer/src/components/LabwareSelectionModal/LabwareItem.tsx +++ b/protocol-designer/src/components/LabwareSelectionModal/LabwareItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import cx from 'classnames' import { Icon } from '@opentrons/components' diff --git a/protocol-designer/src/components/LabwareSelectionModal/LabwarePreview.tsx b/protocol-designer/src/components/LabwareSelectionModal/LabwarePreview.tsx index ada2d060199..5d82ec73191 100644 --- a/protocol-designer/src/components/LabwareSelectionModal/LabwarePreview.tsx +++ b/protocol-designer/src/components/LabwareSelectionModal/LabwarePreview.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import reduce from 'lodash/reduce' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/components/LabwareSelectionModal/__tests__/LabwareSelectionModal.test.tsx b/protocol-designer/src/components/LabwareSelectionModal/__tests__/LabwareSelectionModal.test.tsx index 82d60769f9a..ab56ace5c46 100644 --- a/protocol-designer/src/components/LabwareSelectionModal/__tests__/LabwareSelectionModal.test.tsx +++ b/protocol-designer/src/components/LabwareSelectionModal/__tests__/LabwareSelectionModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { diff --git a/protocol-designer/src/components/LiquidPlacementForm/LiquidPlacementForm.tsx b/protocol-designer/src/components/LiquidPlacementForm/LiquidPlacementForm.tsx index a49844b07c4..1221d479448 100644 --- a/protocol-designer/src/components/LiquidPlacementForm/LiquidPlacementForm.tsx +++ b/protocol-designer/src/components/LiquidPlacementForm/LiquidPlacementForm.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Controller, useForm } from 'react-hook-form' import isEmpty from 'lodash/isEmpty' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/components/LiquidPlacementModal.tsx b/protocol-designer/src/components/LiquidPlacementModal.tsx index 64025e370db..307255ae846 100644 --- a/protocol-designer/src/components/LiquidPlacementModal.tsx +++ b/protocol-designer/src/components/LiquidPlacementModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import cx from 'classnames' @@ -21,9 +21,7 @@ import styles from './LiquidPlacementModal.module.css' import type { WellGroup } from '@opentrons/components' export function LiquidPlacementModal(): JSX.Element | null { - const [highlightedWells, setHighlightedWells] = React.useState< - WellGroup | {} - >({}) + const [highlightedWells, setHighlightedWells] = useState({}) const labwareId = useSelector(selectors.getSelectedLabwareId) const selectedWells = useSelector(getSelectedWells) const dispatch = useDispatch() diff --git a/protocol-designer/src/components/LiquidsPage/LiquidEditForm.tsx b/protocol-designer/src/components/LiquidsPage/LiquidEditForm.tsx index 6fae38d4fb5..1bf69d7ebd1 100644 --- a/protocol-designer/src/components/LiquidsPage/LiquidEditForm.tsx +++ b/protocol-designer/src/components/LiquidsPage/LiquidEditForm.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { Controller, useForm } from 'react-hook-form' import { yupResolver } from '@hookform/resolvers/yup' diff --git a/protocol-designer/src/components/LiquidsPage/LiquidsPageInfo.tsx b/protocol-designer/src/components/LiquidsPage/LiquidsPageInfo.tsx index 0e7157b0986..22f73b55db3 100644 --- a/protocol-designer/src/components/LiquidsPage/LiquidsPageInfo.tsx +++ b/protocol-designer/src/components/LiquidsPage/LiquidsPageInfo.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Icon } from '@opentrons/components' import styles from './LiquidsPageInfo.module.css' diff --git a/protocol-designer/src/components/LiquidsPage/index.tsx b/protocol-designer/src/components/LiquidsPage/index.tsx index e6f4387e936..761b4ef5d73 100644 --- a/protocol-designer/src/components/LiquidsPage/index.tsx +++ b/protocol-designer/src/components/LiquidsPage/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import * as labwareIngredActions from '../../labware-ingred/actions' diff --git a/protocol-designer/src/components/LiquidsSidebar/index.tsx b/protocol-designer/src/components/LiquidsSidebar/index.tsx index 1d5520fe45a..174422b1878 100644 --- a/protocol-designer/src/components/LiquidsSidebar/index.tsx +++ b/protocol-designer/src/components/LiquidsSidebar/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { diff --git a/protocol-designer/src/components/OffDeckLabwareButton.tsx b/protocol-designer/src/components/OffDeckLabwareButton.tsx index 41c0f34d899..585cf6aca12 100644 --- a/protocol-designer/src/components/OffDeckLabwareButton.tsx +++ b/protocol-designer/src/components/OffDeckLabwareButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { @@ -14,7 +14,7 @@ import { OffDeckLabwareSlideout } from './OffDeckLabwareSlideout' export const OffDeckLabwareButton = (): JSX.Element => { const selectedTerminalItemId = useSelector(getSelectedTerminalItemId) const { t } = useTranslation('button') - const [showSlideout, setShowSlideout] = React.useState(false) + const [showSlideout, setShowSlideout] = useState(false) return ( diff --git a/protocol-designer/src/components/OffDeckLabwareSlideout.tsx b/protocol-designer/src/components/OffDeckLabwareSlideout.tsx index fc0e7541262..1fd8be9814c 100644 --- a/protocol-designer/src/components/OffDeckLabwareSlideout.tsx +++ b/protocol-designer/src/components/OffDeckLabwareSlideout.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { css } from 'styled-components' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/components/PrereleaseModeIndicator.tsx b/protocol-designer/src/components/PrereleaseModeIndicator.tsx index 9c932dd0bbb..344a4fbf183 100644 --- a/protocol-designer/src/components/PrereleaseModeIndicator.tsx +++ b/protocol-designer/src/components/PrereleaseModeIndicator.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { Icon } from '@opentrons/components' import { selectors as featureFlagSelectors } from '../feature-flags' diff --git a/protocol-designer/src/components/SettingsPage/FeatureFlagCard/FeatureFlagCard.tsx b/protocol-designer/src/components/SettingsPage/FeatureFlagCard/FeatureFlagCard.tsx index a823c956bbc..2b05ceb6ce4 100644 --- a/protocol-designer/src/components/SettingsPage/FeatureFlagCard/FeatureFlagCard.tsx +++ b/protocol-designer/src/components/SettingsPage/FeatureFlagCard/FeatureFlagCard.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' @@ -19,9 +19,7 @@ export function FeatureFlagCard(): JSX.Element { const flags = useSelector(featureFlagSelectors.getFeatureFlagData) const dispatch = useDispatch() - const [modalFlagName, setModalFlagName] = React.useState( - null - ) + const [modalFlagName, setModalFlagName] = useState(null) const { t } = useTranslation(['modal', 'card', 'feature_flags']) const setFeatureFlags = ( diff --git a/protocol-designer/src/components/SettingsPage/SettingsApp.tsx b/protocol-designer/src/components/SettingsPage/SettingsApp.tsx index cc2714a2efe..20a31121010 100644 --- a/protocol-designer/src/components/SettingsPage/SettingsApp.tsx +++ b/protocol-designer/src/components/SettingsPage/SettingsApp.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/components/SettingsPage/SettingsSidebar.tsx b/protocol-designer/src/components/SettingsPage/SettingsSidebar.tsx index 7f2bac73f52..b5a4619ffae 100644 --- a/protocol-designer/src/components/SettingsPage/SettingsSidebar.tsx +++ b/protocol-designer/src/components/SettingsPage/SettingsSidebar.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { SidePanel } from '@opentrons/components' diff --git a/protocol-designer/src/components/SettingsPage/index.tsx b/protocol-designer/src/components/SettingsPage/index.tsx index 475ba23946c..793914acd33 100644 --- a/protocol-designer/src/components/SettingsPage/index.tsx +++ b/protocol-designer/src/components/SettingsPage/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { selectors } from '../../navigation' diff --git a/protocol-designer/src/components/StepEditForm/ButtonRow/index.tsx b/protocol-designer/src/components/StepEditForm/ButtonRow/index.tsx index 7ad90fec9ed..1f8faf42024 100644 --- a/protocol-designer/src/components/StepEditForm/ButtonRow/index.tsx +++ b/protocol-designer/src/components/StepEditForm/ButtonRow/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import cx from 'classnames' import { OutlineButton, DeprecatedPrimaryButton } from '@opentrons/components' diff --git a/protocol-designer/src/components/StepEditForm/StepEditFormComponent.tsx b/protocol-designer/src/components/StepEditForm/StepEditFormComponent.tsx index c740475bfcc..672b562b0ec 100644 --- a/protocol-designer/src/components/StepEditForm/StepEditFormComponent.tsx +++ b/protocol-designer/src/components/StepEditForm/StepEditFormComponent.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import get from 'lodash/get' import { MoreOptionsModal } from '../modals/MoreOptionsModal' diff --git a/protocol-designer/src/components/StepEditForm/fields/BlowoutLocationField.tsx b/protocol-designer/src/components/StepEditForm/fields/BlowoutLocationField.tsx index 85d5f53e069..99e5846782e 100644 --- a/protocol-designer/src/components/StepEditForm/fields/BlowoutLocationField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/BlowoutLocationField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { DropdownField } from '@opentrons/components' import cx from 'classnames' diff --git a/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx b/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx index f454c63cd79..8c6785d6689 100644 --- a/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { DEST_WELL_BLOWOUT_DESTINATION, @@ -35,7 +35,7 @@ export function BlowoutZOffsetField( name, updateValue, } = props - const [isModalOpen, setModalOpen] = React.useState(false) + const [isModalOpen, setModalOpen] = useState(false) const [targetProps, tooltipProps] = useHoverTooltip() const labwareEntities = useSelector(getLabwareEntities) diff --git a/protocol-designer/src/components/StepEditForm/fields/ChangeTipField/index.tsx b/protocol-designer/src/components/StepEditForm/fields/ChangeTipField/index.tsx index 62ce68d1ae9..f367fabcff6 100644 --- a/protocol-designer/src/components/StepEditForm/fields/ChangeTipField/index.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/ChangeTipField/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { FormGroup, diff --git a/protocol-designer/src/components/StepEditForm/fields/CheckboxRowField.tsx b/protocol-designer/src/components/StepEditForm/fields/CheckboxRowField.tsx index d049d8b3b51..92483f5cb16 100644 --- a/protocol-designer/src/components/StepEditForm/fields/CheckboxRowField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/CheckboxRowField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { DeprecatedCheckboxField, useHoverTooltip, diff --git a/protocol-designer/src/components/StepEditForm/fields/DelayFields.tsx b/protocol-designer/src/components/StepEditForm/fields/DelayFields.tsx index ec8dab06f2f..41fa2e36a4d 100644 --- a/protocol-designer/src/components/StepEditForm/fields/DelayFields.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/DelayFields.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { TextField } from './TextField' import { CheckboxRowField } from './CheckboxRowField' diff --git a/protocol-designer/src/components/StepEditForm/fields/DisposalVolumeField.tsx b/protocol-designer/src/components/StepEditForm/fields/DisposalVolumeField.tsx index c1df940087d..0363181edc2 100644 --- a/protocol-designer/src/components/StepEditForm/fields/DisposalVolumeField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/DisposalVolumeField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import cx from 'classnames' diff --git a/protocol-designer/src/components/StepEditForm/fields/DropTipField/__tests__/DropTipField.test.tsx b/protocol-designer/src/components/StepEditForm/fields/DropTipField/__tests__/DropTipField.test.tsx index b9b2a608c46..88c9c6a0d0d 100644 --- a/protocol-designer/src/components/StepEditForm/fields/DropTipField/__tests__/DropTipField.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/DropTipField/__tests__/DropTipField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fixtureTiprack1000ul } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/StepEditForm/fields/FlowRateField/__tests__/FlowRateField.test.tsx b/protocol-designer/src/components/StepEditForm/fields/FlowRateField/__tests__/FlowRateField.test.tsx index 54ab06b09ce..f1420438aa9 100644 --- a/protocol-designer/src/components/StepEditForm/fields/FlowRateField/__tests__/FlowRateField.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/FlowRateField/__tests__/FlowRateField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import '@testing-library/jest-dom/vitest' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/components/StepEditForm/fields/FlowRateField/index.tsx b/protocol-designer/src/components/StepEditForm/fields/FlowRateField/index.tsx index 165ec2553a1..9f489d5bcf0 100644 --- a/protocol-designer/src/components/StepEditForm/fields/FlowRateField/index.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/FlowRateField/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { FlowRateInput } from './FlowRateInput' import { useSelector } from 'react-redux' import { selectors as stepFormSelectors } from '../../../../step-forms' diff --git a/protocol-designer/src/components/StepEditForm/fields/LabwareField.tsx b/protocol-designer/src/components/StepEditForm/fields/LabwareField.tsx index 75756800ac5..7a0e1a06efe 100644 --- a/protocol-designer/src/components/StepEditForm/fields/LabwareField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/LabwareField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { getDisposalOptions, diff --git a/protocol-designer/src/components/StepEditForm/fields/LabwareLocationField/index.tsx b/protocol-designer/src/components/StepEditForm/fields/LabwareLocationField/index.tsx index dcbf677a254..1d38ad8d0a6 100644 --- a/protocol-designer/src/components/StepEditForm/fields/LabwareLocationField/index.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/LabwareLocationField/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/components/StepEditForm/fields/MixFields.tsx b/protocol-designer/src/components/StepEditForm/fields/MixFields.tsx index a86c9271fb0..623227b6c9b 100644 --- a/protocol-designer/src/components/StepEditForm/fields/MixFields.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/MixFields.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { CheckboxRowField, TextField } from './' import styles from '../StepEditForm.module.css' diff --git a/protocol-designer/src/components/StepEditForm/fields/MoveLabwareField.tsx b/protocol-designer/src/components/StepEditForm/fields/MoveLabwareField.tsx index b0a6d51b463..137ce6de586 100644 --- a/protocol-designer/src/components/StepEditForm/fields/MoveLabwareField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/MoveLabwareField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { getMoveLabwareOptions } from '../../../ui/labware/selectors' import { StepFormDropdown } from './StepFormDropdownField' diff --git a/protocol-designer/src/components/StepEditForm/fields/PathField/PathField.tsx b/protocol-designer/src/components/StepEditForm/fields/PathField/PathField.tsx index d7c5916e8be..5710963c4b4 100644 --- a/protocol-designer/src/components/StepEditForm/fields/PathField/PathField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/PathField/PathField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import cx from 'classnames' diff --git a/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/_tests__/PickUpTipField.test.tsx b/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/_tests__/PickUpTipField.test.tsx index 8b4a61bc8cd..eba32213728 100644 --- a/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/_tests__/PickUpTipField.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/_tests__/PickUpTipField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { describe, it, vi, beforeEach, expect } from 'vitest' diff --git a/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/index.tsx b/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/index.tsx index d30eeb2fe0e..f9b89679ac0 100644 --- a/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/index.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/PickUpTipField/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { DropdownField, FormGroup } from '@opentrons/components' diff --git a/protocol-designer/src/components/StepEditForm/fields/PipetteField.tsx b/protocol-designer/src/components/StepEditForm/fields/PipetteField.tsx index 70813f1f285..10b569a5f23 100644 --- a/protocol-designer/src/components/StepEditForm/fields/PipetteField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/PipetteField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { FormGroup, DropdownField } from '@opentrons/components' diff --git a/protocol-designer/src/components/StepEditForm/fields/ProfileItemRows.tsx b/protocol-designer/src/components/StepEditForm/fields/ProfileItemRows.tsx index 7e8520f4e12..be535bd0283 100644 --- a/protocol-designer/src/components/StepEditForm/fields/ProfileItemRows.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/ProfileItemRows.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' import cx from 'classnames' diff --git a/protocol-designer/src/components/StepEditForm/fields/RadioGroupField.tsx b/protocol-designer/src/components/StepEditForm/fields/RadioGroupField.tsx index c073fe7d486..05048abf216 100644 --- a/protocol-designer/src/components/StepEditForm/fields/RadioGroupField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/RadioGroupField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { RadioGroup } from '@opentrons/components' import type { StepFieldName } from '../../../steplist/fieldLevel' import type { FieldProps } from '../types' diff --git a/protocol-designer/src/components/StepEditForm/fields/StepFormDropdownField.tsx b/protocol-designer/src/components/StepEditForm/fields/StepFormDropdownField.tsx index 54c7bd2cff9..0237b6d2ebc 100644 --- a/protocol-designer/src/components/StepEditForm/fields/StepFormDropdownField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/StepFormDropdownField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { DropdownField } from '@opentrons/components' import cx from 'classnames' import styles from '../StepEditForm.module.css' diff --git a/protocol-designer/src/components/StepEditForm/fields/TextField.tsx b/protocol-designer/src/components/StepEditForm/fields/TextField.tsx index 0aa76ce59f0..8db378b24c5 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TextField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TextField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { LegacyInputField } from '@opentrons/components' import type { FieldProps } from '../types' diff --git a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionAllViz.tsx b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionAllViz.tsx index 1b0ba9547e1..73604a085f6 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionAllViz.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionAllViz.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import round from 'lodash/round' import PIPETTE_TIP_IMAGE from '../../../../assets/images/pipette_tip.svg' diff --git a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionZAxisViz.tsx b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionZAxisViz.tsx index 66402cf56b9..c86364a11c6 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionZAxisViz.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/TipPositionZAxisViz.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import round from 'lodash/round' import PIPETTE_TIP_IMAGE from '../../../../assets/images/pipette_tip.svg' diff --git a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionField.test.tsx b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionField.test.tsx index 1f40927e21c..96896fa7baa 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionField.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fixture96Plate } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionModal.test.tsx b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionModal.test.tsx index 788506118bd..00c59baae82 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionModal.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/TipPositionModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { renderWithProviders } from '../../../../../__testing-utils__' diff --git a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/ZTipPositionModal.test.tsx b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/ZTipPositionModal.test.tsx index 56bd01c6bea..5db7590ed09 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/ZTipPositionModal.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TipPositionField/__tests__/ZTipPositionModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { renderWithProviders } from '../../../../../__testing-utils__' diff --git a/protocol-designer/src/components/StepEditForm/fields/TipWellSelectionField/__tests__/TipWellSelectionField.test.tsx b/protocol-designer/src/components/StepEditForm/fields/TipWellSelectionField/__tests__/TipWellSelectionField.test.tsx index 1d332740d65..935856747fc 100644 --- a/protocol-designer/src/components/StepEditForm/fields/TipWellSelectionField/__tests__/TipWellSelectionField.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/TipWellSelectionField/__tests__/TipWellSelectionField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, vi, beforeEach } from 'vitest' diff --git a/protocol-designer/src/components/StepEditForm/fields/ToggleRowField.tsx b/protocol-designer/src/components/StepEditForm/fields/ToggleRowField.tsx index d680dfe9b6d..e3a8bf4bcdd 100644 --- a/protocol-designer/src/components/StepEditForm/fields/ToggleRowField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/ToggleRowField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { ToggleField } from '@opentrons/components' diff --git a/protocol-designer/src/components/StepEditForm/fields/VolumeField.tsx b/protocol-designer/src/components/StepEditForm/fields/VolumeField.tsx index a65e0303e6b..61592213ca6 100644 --- a/protocol-designer/src/components/StepEditForm/fields/VolumeField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/VolumeField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { FormGroup, diff --git a/protocol-designer/src/components/StepEditForm/fields/WellOrderField/WellOrderViz.tsx b/protocol-designer/src/components/StepEditForm/fields/WellOrderField/WellOrderViz.tsx index 75436c1e801..2f1af411cb7 100644 --- a/protocol-designer/src/components/StepEditForm/fields/WellOrderField/WellOrderViz.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/WellOrderField/WellOrderViz.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import WELLS_IMAGE from '../../../../assets/images/well_order_wells.svg' diff --git a/protocol-designer/src/components/StepEditForm/fields/WellOrderField/index.tsx b/protocol-designer/src/components/StepEditForm/fields/WellOrderField/index.tsx index 601cf9c84d6..cf54bb141e1 100644 --- a/protocol-designer/src/components/StepEditForm/fields/WellOrderField/index.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/WellOrderField/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { @@ -40,7 +40,7 @@ export const WellOrderField = (props: WellOrderFieldProps): JSX.Element => { updateSecondWellOrder, } = props const { t } = useTranslation(['form', 'modal']) - const [isModalOpen, setModalOpen] = React.useState(false) + const [isModalOpen, setModalOpen] = useState(false) const handleOpen = (): void => { setModalOpen(true) diff --git a/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx b/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx index 6f8a2009eb1..c1ed96d7dad 100644 --- a/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { createPortal } from 'react-dom' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/components/StepEditForm/fields/__tests__/BlowoutZOffsetField.test.tsx b/protocol-designer/src/components/StepEditForm/fields/__tests__/BlowoutZOffsetField.test.tsx index fec53a25ac4..e994e2f8bed 100644 --- a/protocol-designer/src/components/StepEditForm/fields/__tests__/BlowoutZOffsetField.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/__tests__/BlowoutZOffsetField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { fixture96Plate } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/StepEditForm/fields/__tests__/TiprackField.test.tsx b/protocol-designer/src/components/StepEditForm/fields/__tests__/TiprackField.test.tsx index efb78473b38..3ce28a17ee8 100644 --- a/protocol-designer/src/components/StepEditForm/fields/__tests__/TiprackField.test.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/__tests__/TiprackField.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { i18n } from '../../../../assets/localization' diff --git a/protocol-designer/src/components/StepEditForm/forms/AspDispSection.tsx b/protocol-designer/src/components/StepEditForm/forms/AspDispSection.tsx index a5301ffd1d0..fd8acbaed20 100644 --- a/protocol-designer/src/components/StepEditForm/forms/AspDispSection.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/AspDispSection.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { IconButton, diff --git a/protocol-designer/src/components/StepEditForm/forms/CommentForm/index.tsx b/protocol-designer/src/components/StepEditForm/forms/CommentForm/index.tsx index 277810c5bcb..80f02c775e5 100644 --- a/protocol-designer/src/components/StepEditForm/forms/CommentForm/index.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/CommentForm/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { FormGroup, SPACING } from '@opentrons/components' import { TextField } from '../../fields' diff --git a/protocol-designer/src/components/StepEditForm/forms/HeaterShakerForm/index.tsx b/protocol-designer/src/components/StepEditForm/forms/HeaterShakerForm/index.tsx index c2e984ac351..1c851f3608b 100644 --- a/protocol-designer/src/components/StepEditForm/forms/HeaterShakerForm/index.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/HeaterShakerForm/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' diff --git a/protocol-designer/src/components/StepEditForm/forms/MagnetForm.tsx b/protocol-designer/src/components/StepEditForm/forms/MagnetForm.tsx index 1976767e7e5..523e6c5f3f5 100644 --- a/protocol-designer/src/components/StepEditForm/forms/MagnetForm.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/MagnetForm.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { FormGroup } from '@opentrons/components' diff --git a/protocol-designer/src/components/StepEditForm/forms/MixForm.tsx b/protocol-designer/src/components/StepEditForm/forms/MixForm.tsx index 598e35e213a..492ed633423 100644 --- a/protocol-designer/src/components/StepEditForm/forms/MixForm.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/MixForm.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import cx from 'classnames' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -39,7 +39,7 @@ import type { StepFormProps } from '../types' import styles from '../StepEditForm.module.css' export const MixForm = (props: StepFormProps): JSX.Element => { - const [collapsed, setCollapsed] = React.useState(true) + const [collapsed, setCollapsed] = useState(true) const pipettes = useSelector(getPipetteEntities) const enableReturnTip = useSelector(getEnableReturnTip) const labwares = useSelector(getLabwareEntities) diff --git a/protocol-designer/src/components/StepEditForm/forms/MoveLabwareForm/index.tsx b/protocol-designer/src/components/StepEditForm/forms/MoveLabwareForm/index.tsx index 1b15143982f..87811db0087 100644 --- a/protocol-designer/src/components/StepEditForm/forms/MoveLabwareForm/index.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/MoveLabwareForm/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { diff --git a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx index 6e972dac3a1..a47f47eb7d4 100644 --- a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestFields.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { getAdditionalEquipmentEntities } from '../../../../step-forms/selectors' diff --git a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestHeaders.tsx b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestHeaders.tsx index 0e44bca110d..7e1aab6c5ff 100644 --- a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestHeaders.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/SourceDestHeaders.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { FormGroup } from '@opentrons/components' diff --git a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/index.tsx b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/index.tsx index 94e83805a0d..959d5b4c99f 100644 --- a/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/index.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/MoveLiquidForm/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import cx from 'classnames' import { useSelector } from 'react-redux' @@ -32,7 +32,7 @@ export const MoveLiquidForm = (props: StepFormProps): JSX.Element => { const { propsForFields, formData } = props const { stepType, path } = formData const { t } = useTranslation(['application', 'form']) - const [collapsed, _setCollapsed] = React.useState(true) + const [collapsed, _setCollapsed] = useState(true) const enableReturnTip = useSelector(getEnableReturnTip) const labwares = useSelector(getLabwareEntities) const pipettes = useSelector(getPipetteEntities) diff --git a/protocol-designer/src/components/StepEditForm/forms/PauseForm.tsx b/protocol-designer/src/components/StepEditForm/forms/PauseForm.tsx index 77f40b06c45..01fb333f9b2 100644 --- a/protocol-designer/src/components/StepEditForm/forms/PauseForm.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/PauseForm.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import cx from 'classnames' import { useSelector } from 'react-redux' diff --git a/protocol-designer/src/components/StepEditForm/forms/TemperatureForm.tsx b/protocol-designer/src/components/StepEditForm/forms/TemperatureForm.tsx index bcd35a1636f..f89646fac3b 100644 --- a/protocol-designer/src/components/StepEditForm/forms/TemperatureForm.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/TemperatureForm.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { FormGroup } from '@opentrons/components' @@ -40,7 +40,7 @@ export function TemperatureForm(props: StepFormProps): JSX.Element { {temperatureModuleIds != null ? temperatureModuleIds.map(id => id === moduleId ? ( - +
-
+ ) : null ) : null} diff --git a/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/ProfileSettings.tsx b/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/ProfileSettings.tsx index 362860e404d..229e1c8bfdf 100644 --- a/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/ProfileSettings.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/ProfileSettings.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { FormGroup } from '@opentrons/components' diff --git a/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/StateFields.tsx b/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/StateFields.tsx index c72d4d1cc81..5eb1429882a 100644 --- a/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/StateFields.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/StateFields.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/index.tsx b/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/index.tsx index 60160df4dea..c8c570d3d0e 100644 --- a/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/index.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/ThermocyclerForm/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { THERMOCYCLER_STATE, THERMOCYCLER_PROFILE } from '../../../../constants' diff --git a/protocol-designer/src/components/StepEditForm/forms/__tests__/HeaterShakerForm.test.tsx b/protocol-designer/src/components/StepEditForm/forms/__tests__/HeaterShakerForm.test.tsx index daa9bc3a2bb..038a2f47545 100644 --- a/protocol-designer/src/components/StepEditForm/forms/__tests__/HeaterShakerForm.test.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/__tests__/HeaterShakerForm.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, afterEach, vi } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '../../../../__testing-utils__' diff --git a/protocol-designer/src/components/StepEditForm/forms/__tests__/MagnetForm.test.tsx b/protocol-designer/src/components/StepEditForm/forms/__tests__/MagnetForm.test.tsx index 3d7da5e0e98..198f2c68bd2 100644 --- a/protocol-designer/src/components/StepEditForm/forms/__tests__/MagnetForm.test.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/__tests__/MagnetForm.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, afterEach, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { cleanup, fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/components/StepEditForm/forms/__tests__/TemperatureForm.test.tsx b/protocol-designer/src/components/StepEditForm/forms/__tests__/TemperatureForm.test.tsx index 18ea254c353..098e75a28cb 100644 --- a/protocol-designer/src/components/StepEditForm/forms/__tests__/TemperatureForm.test.tsx +++ b/protocol-designer/src/components/StepEditForm/forms/__tests__/TemperatureForm.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../../__testing-utils__' diff --git a/protocol-designer/src/components/StepEditForm/index.tsx b/protocol-designer/src/components/StepEditForm/index.tsx index d5deca21ebc..738d86a2ed8 100644 --- a/protocol-designer/src/components/StepEditForm/index.tsx +++ b/protocol-designer/src/components/StepEditForm/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { connect } from 'react-redux' import { useConditionalConfirm } from '@opentrons/components' @@ -23,6 +23,7 @@ import { makeSingleEditFieldProps } from './fields/makeSingleEditFieldProps' import { StepEditFormComponent } from './StepEditFormComponent' import { getDirtyFields } from './utils' +import type { ConnectedComponent } from 'react-redux' import type { InvariantContext } from '@opentrons/step-generation' import type { BaseState, ThunkDispatch } from '../../types' import type { FormData, StepFieldName, StepIdType } from '../../form-types' @@ -65,12 +66,11 @@ const StepEditFormManager = ( invariantContext, } = props const { t } = useTranslation('tooltip') - const [ - showMoreOptionsModal, - setShowMoreOptionsModal, - ] = React.useState(false) - const [focusedField, setFocusedField] = React.useState(null) - const [dirtyFields, setDirtyFields] = React.useState( + const [showMoreOptionsModal, setShowMoreOptionsModal] = useState( + false + ) + const [focusedField, setFocusedField] = useState(null) + const [dirtyFields, setDirtyFields] = useState( getDirtyFields(isNewStep, formData) ) const toggleMoreOptionsModal = (): void => { @@ -247,7 +247,10 @@ const mapDispatchToProps = (dispatch: ThunkDispatch): DP => { // It doesn't matter if the children are using connect or useSelector, // only the parent matters.) // https://react-redux.js.org/api/hooks#stale-props-and-zombie-children -export const StepEditForm = connect( +export const StepEditForm: ConnectedComponent< + typeof StepEditFormManager, + {} +> = connect( mapStateToProps, mapDispatchToProps )((props: StepEditFormManagerProps) => ( diff --git a/protocol-designer/src/components/StepSelectionBanner/StepSelectionBannerComponent.tsx b/protocol-designer/src/components/StepSelectionBanner/StepSelectionBannerComponent.tsx index dba6a582770..468557e0cda 100644 --- a/protocol-designer/src/components/StepSelectionBanner/StepSelectionBannerComponent.tsx +++ b/protocol-designer/src/components/StepSelectionBanner/StepSelectionBannerComponent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import startCase from 'lodash/startCase' import { css } from 'styled-components' diff --git a/protocol-designer/src/components/StepSelectionBanner/index.tsx b/protocol-designer/src/components/StepSelectionBanner/index.tsx index 7f0d8ed207a..0180efb63eb 100644 --- a/protocol-designer/src/components/StepSelectionBanner/index.tsx +++ b/protocol-designer/src/components/StepSelectionBanner/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { memo } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useConditionalConfirm } from '@opentrons/components' import { selectors as stepFormSelectors } from '../../step-forms' @@ -12,9 +12,7 @@ import { StepSelectionBannerComponent } from './StepSelectionBannerComponent' import type { ThunkDispatch } from 'redux-thunk' import type { BaseState } from '../../types' -const MemoizedStepSelectionBannerComponent = React.memo( - StepSelectionBannerComponent -) +const MemoizedStepSelectionBannerComponent = memo(StepSelectionBannerComponent) export const StepSelectionBanner = (): JSX.Element => { const countPerStepType = useSelector(getCountPerStepType) diff --git a/protocol-designer/src/components/TitledListNotes.tsx b/protocol-designer/src/components/TitledListNotes.tsx index 13c4d015b15..fb48015dbce 100644 --- a/protocol-designer/src/components/TitledListNotes.tsx +++ b/protocol-designer/src/components/TitledListNotes.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styles from './TitledListNotes.module.css' import { useTranslation } from 'react-i18next' import { truncateString } from '@opentrons/components' diff --git a/protocol-designer/src/components/WellSelectionInstructions.tsx b/protocol-designer/src/components/WellSelectionInstructions.tsx index 88595fbf6f9..d2f83ebdf25 100644 --- a/protocol-designer/src/components/WellSelectionInstructions.tsx +++ b/protocol-designer/src/components/WellSelectionInstructions.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Icon } from '@opentrons/components' import styles from './WellSelectionInstructions.module.css' diff --git a/protocol-designer/src/components/__tests__/EditModules.test.tsx b/protocol-designer/src/components/__tests__/EditModules.test.tsx index 4315f481885..6c980fecd25 100644 --- a/protocol-designer/src/components/__tests__/EditModules.test.tsx +++ b/protocol-designer/src/components/__tests__/EditModules.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import { vi, beforeEach, describe, it } from 'vitest' import { diff --git a/protocol-designer/src/components/__tests__/FilePage.test.tsx b/protocol-designer/src/components/__tests__/FilePage.test.tsx index 0e26988dc99..6eb453865db 100644 --- a/protocol-designer/src/components/__tests__/FilePage.test.tsx +++ b/protocol-designer/src/components/__tests__/FilePage.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, expect, beforeEach, it } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../__testing-utils__' diff --git a/protocol-designer/src/components/__tests__/StepCreationButton.test.tsx b/protocol-designer/src/components/__tests__/StepCreationButton.test.tsx index ccf7139aed3..2ffeb22bfe0 100644 --- a/protocol-designer/src/components/__tests__/StepCreationButton.test.tsx +++ b/protocol-designer/src/components/__tests__/StepCreationButton.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { vi, describe, beforeEach, it } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../__testing-utils__' diff --git a/protocol-designer/src/components/alerts/Alerts.tsx b/protocol-designer/src/components/alerts/Alerts.tsx index 30f70e09242..92e40cad6b4 100644 --- a/protocol-designer/src/components/alerts/Alerts.tsx +++ b/protocol-designer/src/components/alerts/Alerts.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { memo } from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' @@ -176,4 +176,4 @@ const AlertsComponent = (props: Props): JSX.Element => { ) } -export const Alerts = React.memo(AlertsComponent) +export const Alerts = memo(AlertsComponent) diff --git a/protocol-designer/src/components/alerts/ErrorContents.tsx b/protocol-designer/src/components/alerts/ErrorContents.tsx index 3cb787f5c8a..25aadd39467 100644 --- a/protocol-designer/src/components/alerts/ErrorContents.tsx +++ b/protocol-designer/src/components/alerts/ErrorContents.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useTranslation } from 'react-i18next' import { START_TERMINAL_ITEM_ID } from '../../steplist' import { KnowledgeBaseLink } from '../KnowledgeBaseLink' @@ -50,11 +50,11 @@ export const ErrorContents = ( } } else if (props.level === 'form') { return ( - + {t(`form.error.${props.errorType}.body`, { defaultValue: '', })} - + ) } else { return null diff --git a/protocol-designer/src/components/alerts/PDAlert.tsx b/protocol-designer/src/components/alerts/PDAlert.tsx index ab82e1b4ea2..f85d90b9f2d 100644 --- a/protocol-designer/src/components/alerts/PDAlert.tsx +++ b/protocol-designer/src/components/alerts/PDAlert.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { AlertItem, OutlineButton } from '@opentrons/components' diff --git a/protocol-designer/src/components/alerts/WarningContents.tsx b/protocol-designer/src/components/alerts/WarningContents.tsx index 02e0ac54b57..6f876315000 100644 --- a/protocol-designer/src/components/alerts/WarningContents.tsx +++ b/protocol-designer/src/components/alerts/WarningContents.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useTranslation } from 'react-i18next' import { START_TERMINAL_ITEM_ID } from '../../steplist' import { TerminalItemLink } from '../steplist/TerminalItem' @@ -25,20 +25,20 @@ export const WarningContents = ( ) default: return ( - + {t(`timeline.warning.${props.warningType}.body`, { defaultValue: '', })} - + ) } } else if (props.level === 'form') { return ( - + {t(`form.warning.${props.warningType}.body`, { defaultValue: '', })} - + ) } else { return null diff --git a/protocol-designer/src/components/labware/BrowsableLabware.tsx b/protocol-designer/src/components/labware/BrowsableLabware.tsx index 6d6333ec3aa..01a80d6a7e6 100644 --- a/protocol-designer/src/components/labware/BrowsableLabware.tsx +++ b/protocol-designer/src/components/labware/BrowsableLabware.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import reduce from 'lodash/reduce' diff --git a/protocol-designer/src/components/labware/BrowseLabwareModal.tsx b/protocol-designer/src/components/labware/BrowseLabwareModal.tsx index 792d2564396..b60bb28499e 100644 --- a/protocol-designer/src/components/labware/BrowseLabwareModal.tsx +++ b/protocol-designer/src/components/labware/BrowseLabwareModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/components/labware/SelectableLabware.tsx b/protocol-designer/src/components/labware/SelectableLabware.tsx index c0e24ee6218..55e9d07a239 100644 --- a/protocol-designer/src/components/labware/SelectableLabware.tsx +++ b/protocol-designer/src/components/labware/SelectableLabware.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import reduce from 'lodash/reduce' import { COLUMN } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/labware/SingleLabware.tsx b/protocol-designer/src/components/labware/SingleLabware.tsx index f6e6a5941ae..6dc3b79072b 100644 --- a/protocol-designer/src/components/labware/SingleLabware.tsx +++ b/protocol-designer/src/components/labware/SingleLabware.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { LabwareRender, RobotWorkSpace } from '@opentrons/components' type Props = React.ComponentProps diff --git a/protocol-designer/src/components/lists/PDListItem.tsx b/protocol-designer/src/components/lists/PDListItem.tsx index 7e3170aaf17..3d1a9a71b20 100644 --- a/protocol-designer/src/components/lists/PDListItem.tsx +++ b/protocol-designer/src/components/lists/PDListItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import styles from './styles.module.css' diff --git a/protocol-designer/src/components/lists/PDTitledList.tsx b/protocol-designer/src/components/lists/PDTitledList.tsx index 070ff922f73..952710d8c69 100644 --- a/protocol-designer/src/components/lists/PDTitledList.tsx +++ b/protocol-designer/src/components/lists/PDTitledList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { TitledList } from '@opentrons/components' import styles from './styles.module.css' diff --git a/protocol-designer/src/components/modals/AutoAddPauseUntilHeaterShakerTempStepModal.tsx b/protocol-designer/src/components/modals/AutoAddPauseUntilHeaterShakerTempStepModal.tsx index c7551b1e376..c630f7be3e9 100644 --- a/protocol-designer/src/components/modals/AutoAddPauseUntilHeaterShakerTempStepModal.tsx +++ b/protocol-designer/src/components/modals/AutoAddPauseUntilHeaterShakerTempStepModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { AlertModal, diff --git a/protocol-designer/src/components/modals/AutoAddPauseUntilTempStepModal.tsx b/protocol-designer/src/components/modals/AutoAddPauseUntilTempStepModal.tsx index faa6f1e9b74..399e4c76d05 100644 --- a/protocol-designer/src/components/modals/AutoAddPauseUntilTempStepModal.tsx +++ b/protocol-designer/src/components/modals/AutoAddPauseUntilTempStepModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { AlertModal, diff --git a/protocol-designer/src/components/modals/ConfirmDeleteModal.tsx b/protocol-designer/src/components/modals/ConfirmDeleteModal.tsx index e9abd1b856b..ad614e5ba64 100644 --- a/protocol-designer/src/components/modals/ConfirmDeleteModal.tsx +++ b/protocol-designer/src/components/modals/ConfirmDeleteModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { AlertModal } from '@opentrons/components' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/GoBack.tsx b/protocol-designer/src/components/modals/CreateFileWizard/GoBack.tsx index 4c590d7d604..4ac622e76c4 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/GoBack.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/GoBack.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { Btn, Text, TYPOGRAPHY } from '@opentrons/components' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/HandleEnter.tsx b/protocol-designer/src/components/modals/CreateFileWizard/HandleEnter.tsx index f2e54352996..8ab7c868127 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/HandleEnter.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/HandleEnter.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { HandleKeypress } from '@opentrons/components' interface HandleEnterProps { diff --git a/protocol-designer/src/components/modals/CreateFileWizard/InputField.tsx b/protocol-designer/src/components/modals/CreateFileWizard/InputField.tsx index ea6a50648eb..bf69fab51dd 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/InputField.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/InputField.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { css } from 'styled-components' import { ALIGN_CENTER, diff --git a/protocol-designer/src/components/modals/CreateFileWizard/MetadataTile.tsx b/protocol-designer/src/components/modals/CreateFileWizard/MetadataTile.tsx index d6cb5532fc9..f28284aedb6 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/MetadataTile.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/MetadataTile.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/components/modals/CreateFileWizard/ModulesAndOtherTile.tsx b/protocol-designer/src/components/modals/CreateFileWizard/ModulesAndOtherTile.tsx index 0c7f043bf70..2f63d6667bb 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/ModulesAndOtherTile.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/ModulesAndOtherTile.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import styled from 'styled-components' import { useSelector } from 'react-redux' import without from 'lodash/without' @@ -226,7 +226,7 @@ function FlexModuleFields(props: WizardTileProps): JSX.Element { modules, trashType: 'trashBin', }) - React.useEffect(() => { + useEffect(() => { if (trashBinDisabled) { setValue('additionalEquipment', without(additionalEquipment, 'trashBin')) } diff --git a/protocol-designer/src/components/modals/CreateFileWizard/PipetteTipsTile.tsx b/protocol-designer/src/components/modals/CreateFileWizard/PipetteTipsTile.tsx index 7ce8cbe8678..dbb51e5d6a6 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/PipetteTipsTile.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/PipetteTipsTile.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { useDispatch, useSelector } from 'react-redux' @@ -161,9 +161,7 @@ function PipetteTipsField(props: PipetteTipsFieldProps): JSX.Element | null { const pipettesByMount = watch('pipettesByMount') const allowAllTipracks = useSelector(getAllowAllTipracks) const dispatch = useDispatch>() - const [showCustomTipracks, setShowCustomTipracks] = React.useState( - false - ) + const [showCustomTipracks, setShowCustomTipracks] = useState(false) const allLabware = useSelector(getLabwareDefsByURI) const selectedPipetteName = pipettesByMount[mount].pipetteName const selectedPipetteDefaultTipracks = @@ -189,7 +187,7 @@ function PipetteTipsField(props: PipetteTipsFieldProps): JSX.Element | null { const selectedValues = pipettesByMount[mount].tiprackDefURI ?? [] - React.useEffect(() => { + useEffect(() => { setValue(`pipettesByMount.${mount}.tiprackDefURI`, [ tiprackOptions[0]?.value ?? '', ]) diff --git a/protocol-designer/src/components/modals/CreateFileWizard/PipetteTypeTile.tsx b/protocol-designer/src/components/modals/CreateFileWizard/PipetteTypeTile.tsx index 56fd71a5f4d..b098838e255 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/PipetteTypeTile.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/PipetteTypeTile.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { @@ -141,7 +141,7 @@ function PipetteField(props: OT2FieldProps): JSX.Element { const fields = watch('fields') const pipettesByMount = watch('pipettesByMount') - const pipetteOptions = React.useMemo(() => { + const pipetteOptions = useMemo(() => { const allPipetteOptions = getAllPipetteNames('maxVolume', 'channels') .filter(name => (fields.robotType === OT2_ROBOT_TYPE @@ -163,7 +163,7 @@ function PipetteField(props: OT2FieldProps): JSX.Element { }, [fields.robotType]) const currentValue = pipettesByMount[mount].pipetteName - React.useEffect(() => { + useEffect(() => { if (currentValue === undefined) { setValue( `pipettesByMount.${mount}.pipetteName`, diff --git a/protocol-designer/src/components/modals/CreateFileWizard/RobotTypeTile.tsx b/protocol-designer/src/components/modals/CreateFileWizard/RobotTypeTile.tsx index 9f54d117ff3..d9e9b5bbe63 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/RobotTypeTile.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/RobotTypeTile.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/protocol-designer/src/components/modals/CreateFileWizard/StagingAreaTile.tsx b/protocol-designer/src/components/modals/CreateFileWizard/StagingAreaTile.tsx index eb5169bc1a6..80cc9dcd939 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/StagingAreaTile.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/StagingAreaTile.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import without from 'lodash/without' import { useTranslation } from 'react-i18next' import { @@ -77,7 +77,7 @@ export function StagingAreaTile(props: WizardTileProps): JSX.Element | null { ? savedStagingAreaSlots : unoccupiedStagingAreaSlots - const [updatedSlots, setUpdatedSlots] = React.useState( + const [updatedSlots, setUpdatedSlots] = useState( initialSlots ) diff --git a/protocol-designer/src/components/modals/CreateFileWizard/WizardHeader.tsx b/protocol-designer/src/components/modals/CreateFileWizard/WizardHeader.tsx index a000c204ca6..081574a34c2 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/WizardHeader.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/WizardHeader.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/CreateFileWizard.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/CreateFileWizard.test.tsx index 90a6aa70565..a1773aea223 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/CreateFileWizard.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/CreateFileWizard.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen, cleanup } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/EquipmentOption.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/EquipmentOption.test.tsx index 5b6835ce5ed..412a94c1ef1 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/EquipmentOption.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/EquipmentOption.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen, cleanup, fireEvent } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/GoBack.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/GoBack.test.tsx index 60a8681fb14..cbea13d58d7 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/GoBack.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/GoBack.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { it, describe, beforeEach, expect, vi } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../../__testing-utils__' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/MetadataTile.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/MetadataTile.test.tsx index d5ea30680bc..eae6706de95 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/MetadataTile.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/MetadataTile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen, cleanup } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/ModulesAndOtherTile.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/ModulesAndOtherTile.test.tsx index c5c01025d51..fdc4e9b86e5 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/ModulesAndOtherTile.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/ModulesAndOtherTile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen, cleanup } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTipsTile.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTipsTile.test.tsx index d29e986a9a6..62936341c3f 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTipsTile.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTipsTile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTypeTile.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTypeTile.test.tsx index ca31e9b18b4..216d183b834 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTypeTile.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/PipetteTypeTile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen, cleanup } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/RobotTypeTile.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/RobotTypeTile.test.tsx index 39451fdc804..b090df57e53 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/RobotTypeTile.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/RobotTypeTile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen, cleanup } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/StagingAreaTile.test.tsx b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/StagingAreaTile.test.tsx index 4e1e4b645bb..4d07a22a586 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/__tests__/StagingAreaTile.test.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/__tests__/StagingAreaTile.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' import { vi, describe, beforeEach, expect, it } from 'vitest' diff --git a/protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx b/protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx index b71e2190b23..13b69f22988 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import { Controller, useForm, useWatch } from 'react-hook-form' @@ -155,7 +155,7 @@ const EditMultipleModulesModalComponent = ( const selectableSlots = mappedModules.length > 0 ? mappedModules : STANDARD_EMPTY_SLOTS - const [updatedSlots, setUpdatedSlots] = React.useState( + const [updatedSlots, setUpdatedSlots] = useState( selectableSlots ) const handleClickAdd = ( diff --git a/protocol-designer/src/components/modals/EditModulesModal/MagneticModuleWarningModalContent.tsx b/protocol-designer/src/components/modals/EditModulesModal/MagneticModuleWarningModalContent.tsx index 6f43254b940..efd00fdf6af 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/MagneticModuleWarningModalContent.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/MagneticModuleWarningModalContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styles from './MagneticModuleWarningModalContent.module.css' import { KnowledgeBaseLink } from '../../KnowledgeBaseLink' diff --git a/protocol-designer/src/components/modals/EditModulesModal/ModelDropdown.tsx b/protocol-designer/src/components/modals/EditModulesModal/ModelDropdown.tsx index 5f6bc6b7938..a71589df1e7 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/ModelDropdown.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/ModelDropdown.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { DropdownField } from '@opentrons/components' import type { ControllerFieldState, diff --git a/protocol-designer/src/components/modals/EditModulesModal/SlotDropdown.tsx b/protocol-designer/src/components/modals/EditModulesModal/SlotDropdown.tsx index 59484539a61..4ba56a55feb 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/SlotDropdown.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/SlotDropdown.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { DropdownField } from '@opentrons/components' import type { ControllerFieldState, diff --git a/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx b/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx index bf13010eefd..72c4ec47df8 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditMultipleModulesModal.test.tsx b/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditMultipleModulesModal.test.tsx index b3e30fe09c5..198d2166e69 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditMultipleModulesModal.test.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditMultipleModulesModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../../__testing-utils__' diff --git a/protocol-designer/src/components/modals/EditModulesModal/index.tsx b/protocol-designer/src/components/modals/EditModulesModal/index.tsx index ed1ff514179..544e92d7362 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/index.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import some from 'lodash/some' @@ -292,7 +292,7 @@ const EditModulesModalComponent = ( const prevSelectedModel = usePrevious(selectedModel) - React.useEffect(() => { + useEffect(() => { if ( prevSelectedModel && prevSelectedModel !== selectedModel && diff --git a/protocol-designer/src/components/modals/EditPipettesModal/StepChangesConfirmModal.tsx b/protocol-designer/src/components/modals/EditPipettesModal/StepChangesConfirmModal.tsx index c18cd31b51b..1410a5a22c3 100644 --- a/protocol-designer/src/components/modals/EditPipettesModal/StepChangesConfirmModal.tsx +++ b/protocol-designer/src/components/modals/EditPipettesModal/StepChangesConfirmModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { AlertModal, OutlineButton } from '@opentrons/components' diff --git a/protocol-designer/src/components/modals/FilePipettesModal/ModuleFields.tsx b/protocol-designer/src/components/modals/FilePipettesModal/ModuleFields.tsx index 6edfae58570..ba9f3a7da74 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/ModuleFields.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/ModuleFields.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex, SPACING, WRAP, ALIGN_CENTER } from '@opentrons/components' import { HEATERSHAKER_MODULE_TYPE, diff --git a/protocol-designer/src/components/modals/FilePipettesModal/PipetteDiagram.tsx b/protocol-designer/src/components/modals/FilePipettesModal/PipetteDiagram.tsx index 6268e1608aa..45110a93142 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/PipetteDiagram.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/PipetteDiagram.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { css } from 'styled-components' import cx from 'classnames' diff --git a/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.tsx b/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.tsx index 2a6c503ef4a..46eed3610c7 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/PipetteFields.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import isEmpty from 'lodash/isEmpty' @@ -63,7 +63,7 @@ export function PipetteFields(props: PipetteFieldsProps): JSX.Element { const initialTabIndex = 1 const has96Channel = values.left.pipetteName === 'p1000_96' - React.useEffect(() => { + useEffect(() => { if (has96Channel) { values.right = { pipetteName: null, tiprackDefURI: null } } diff --git a/protocol-designer/src/components/modals/FilePipettesModal/TiprackOption.tsx b/protocol-designer/src/components/modals/FilePipettesModal/TiprackOption.tsx index 80cbe10d411..c1f4e62c581 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/TiprackOption.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/TiprackOption.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/protocol-designer/src/components/modals/FilePipettesModal/TiprackSelect.tsx b/protocol-designer/src/components/modals/FilePipettesModal/TiprackSelect.tsx index 8c77e315531..c30d414219c 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/TiprackSelect.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/TiprackSelect.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { Flex, DIRECTION_COLUMN, SPACING } from '@opentrons/components' import { TiprackOption } from './TiprackOption' import type { Mount } from '@opentrons/components' @@ -19,7 +19,7 @@ export const TiprackSelect = ( let selectedValues = values[mount].tiprackDefURI ?? [] - React.useEffect(() => { + useEffect(() => { if (selectedValues?.length === 0 && tiprackOptions.length > 0) { selectedValues = [tiprackOptions[0].value] onSetFieldValue(`pipettesByMount.${mount}.tiprackDefURI`, selectedValues) diff --git a/protocol-designer/src/components/modals/FilePipettesModal/__tests__/ModuleFields.test.tsx b/protocol-designer/src/components/modals/FilePipettesModal/__tests__/ModuleFields.test.tsx index 1136be7712e..5d3ceeae8fc 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/__tests__/ModuleFields.test.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/__tests__/ModuleFields.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen, cleanup } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackOptions.test.tsx b/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackOptions.test.tsx index 27810c71176..22736ab2dfd 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackOptions.test.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackOptions.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, beforeEach, it, expect } from 'vitest' import { BORDERS, COLORS } from '@opentrons/components' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackSelect.test.tsx b/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackSelect.test.tsx index bf1f5165002..46ddcf0e229 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackSelect.test.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/__tests__/TiprackSelect.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, beforeEach, it, expect } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '../../../../__testing-utils__' diff --git a/protocol-designer/src/components/modals/FilePipettesModal/index.tsx b/protocol-designer/src/components/modals/FilePipettesModal/index.tsx index 1d6bf141e29..42b8b88cf24 100644 --- a/protocol-designer/src/components/modals/FilePipettesModal/index.tsx +++ b/protocol-designer/src/components/modals/FilePipettesModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useForm } from 'react-hook-form' import { yupResolver } from '@hookform/resolvers/yup' @@ -318,7 +318,7 @@ export const FilePipettesModal = (props: Props): JSX.Element => { const [ showEditPipetteConfirmation, setShowEditPipetteConfirmation, - ] = React.useState(false) + ] = useState(false) const { t } = useTranslation(['modal', 'button', 'form']) const robotType = useSelector(getRobotType) const dispatch = useDispatch() diff --git a/protocol-designer/src/components/modals/FileUploadMessageModal/FileUploadMessageModal.tsx b/protocol-designer/src/components/modals/FileUploadMessageModal/FileUploadMessageModal.tsx index de13295063f..acbf5c444a2 100644 --- a/protocol-designer/src/components/modals/FileUploadMessageModal/FileUploadMessageModal.tsx +++ b/protocol-designer/src/components/modals/FileUploadMessageModal/FileUploadMessageModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import cx from 'classnames' diff --git a/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx b/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx index a58cea838cd..bdf45018f17 100644 --- a/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx +++ b/protocol-designer/src/components/modals/FileUploadMessageModal/modalContents.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import styles from './modalContents.module.css' diff --git a/protocol-designer/src/components/modals/GateModal/index.tsx b/protocol-designer/src/components/modals/GateModal/index.tsx index 5ba7061295b..b3b97e4f366 100644 --- a/protocol-designer/src/components/modals/GateModal/index.tsx +++ b/protocol-designer/src/components/modals/GateModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import cx from 'classnames' diff --git a/protocol-designer/src/components/modals/LabwareUploadMessageModal/LabwareUploadMessageModal.tsx b/protocol-designer/src/components/modals/LabwareUploadMessageModal/LabwareUploadMessageModal.tsx index 2d789d07d67..74c943b1044 100644 --- a/protocol-designer/src/components/modals/LabwareUploadMessageModal/LabwareUploadMessageModal.tsx +++ b/protocol-designer/src/components/modals/LabwareUploadMessageModal/LabwareUploadMessageModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/components/modals/MoreOptionsModal.tsx b/protocol-designer/src/components/modals/MoreOptionsModal.tsx index 2d7cf078479..f57f947f53b 100644 --- a/protocol-designer/src/components/modals/MoreOptionsModal.tsx +++ b/protocol-designer/src/components/modals/MoreOptionsModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilHeaterShakerTempStepModal.test.tsx b/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilHeaterShakerTempStepModal.test.tsx index 8fc7dabc87b..41b2becffbc 100644 --- a/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilHeaterShakerTempStepModal.test.tsx +++ b/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilHeaterShakerTempStepModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilTempStepModal.test.tsx b/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilTempStepModal.test.tsx index 3bec4781034..aa8d4601996 100644 --- a/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilTempStepModal.test.tsx +++ b/protocol-designer/src/components/modals/__tests__/AutoAddPauseUntilTempStepModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/components/modules/AdditionalItemsRow.tsx b/protocol-designer/src/components/modules/AdditionalItemsRow.tsx index 31784f5ee00..35eb6c1a742 100644 --- a/protocol-designer/src/components/modules/AdditionalItemsRow.tsx +++ b/protocol-designer/src/components/modules/AdditionalItemsRow.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import styled from 'styled-components' @@ -52,7 +52,7 @@ export function AdditionalItemsRow( } = props const { t } = useTranslation(['modules', 'shared', 'tooltip']) const [targetProps, tooltipProps] = useHoverTooltip() - const [trashModal, openTrashModal] = React.useState(false) + const [trashModal, openTrashModal] = useState(false) const addTrash = name !== 'gripper' && !isEquipmentAdded const disabledRemoveButton = (name === 'trashBin' && isEquipmentAdded && !hasWasteChute) || diff --git a/protocol-designer/src/components/modules/CrashInfoBox.tsx b/protocol-designer/src/components/modules/CrashInfoBox.tsx index 3d53201d2e1..355f0aeae7b 100644 --- a/protocol-designer/src/components/modules/CrashInfoBox.tsx +++ b/protocol-designer/src/components/modules/CrashInfoBox.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { Icon, SPACING_3 } from '@opentrons/components' import collisionImage from '../../assets/images/modules/module_pipette_collision_warning.png' diff --git a/protocol-designer/src/components/modules/EditModulesCard.tsx b/protocol-designer/src/components/modules/EditModulesCard.tsx index 96b14a48fd2..88dfa1bebe7 100644 --- a/protocol-designer/src/components/modules/EditModulesCard.tsx +++ b/protocol-designer/src/components/modules/EditModulesCard.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { Box, Card, SPACING } from '@opentrons/components' import { diff --git a/protocol-designer/src/components/modules/FlexSlotMap.tsx b/protocol-designer/src/components/modules/FlexSlotMap.tsx index 544b64ec07c..34f5a647207 100644 --- a/protocol-designer/src/components/modules/FlexSlotMap.tsx +++ b/protocol-designer/src/components/modules/FlexSlotMap.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { FLEX_ROBOT_TYPE, getDeckDefFromRobotType, diff --git a/protocol-designer/src/components/modules/ModuleDiagram.tsx b/protocol-designer/src/components/modules/ModuleDiagram.tsx index 22d7f319644..e4211e7df98 100644 --- a/protocol-designer/src/components/modules/ModuleDiagram.tsx +++ b/protocol-designer/src/components/modules/ModuleDiagram.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { css } from 'styled-components' import { MAGNETIC_MODULE_TYPE, diff --git a/protocol-designer/src/components/modules/ModuleRow.tsx b/protocol-designer/src/components/modules/ModuleRow.tsx index aca653fce3a..deca8d94a19 100644 --- a/protocol-designer/src/components/modules/ModuleRow.tsx +++ b/protocol-designer/src/components/modules/ModuleRow.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' import upperFirst from 'lodash/upperFirst' diff --git a/protocol-designer/src/components/modules/MultipleModulesRow.tsx b/protocol-designer/src/components/modules/MultipleModulesRow.tsx index da47f51d255..58e669fc311 100644 --- a/protocol-designer/src/components/modules/MultipleModulesRow.tsx +++ b/protocol-designer/src/components/modules/MultipleModulesRow.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' import { diff --git a/protocol-designer/src/components/modules/StagingAreasModal.tsx b/protocol-designer/src/components/modules/StagingAreasModal.tsx index a58a6ea0f78..5cdf570797e 100644 --- a/protocol-designer/src/components/modules/StagingAreasModal.tsx +++ b/protocol-designer/src/components/modules/StagingAreasModal.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useSelector, useDispatch } from 'react-redux' import { Controller, useForm, useWatch } from 'react-hook-form' @@ -98,7 +98,7 @@ const StagingAreasModalComponent = ( const selectableSlots = mappedStagingAreas.length > 0 ? mappedStagingAreas : STANDARD_EMPTY_SLOTS - const [updatedSlots, setUpdatedSlots] = React.useState( + const [updatedSlots, setUpdatedSlots] = useState( selectableSlots ) diff --git a/protocol-designer/src/components/modules/StagingAreasRow.tsx b/protocol-designer/src/components/modules/StagingAreasRow.tsx index 8428cf33dac..0d769dfa575 100644 --- a/protocol-designer/src/components/modules/StagingAreasRow.tsx +++ b/protocol-designer/src/components/modules/StagingAreasRow.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { @@ -33,9 +33,7 @@ export function StagingAreasRow(props: StagingAreasRowProps): JSX.Element { const { handleAttachment, stagingAreas } = props const { t } = useTranslation(['modules', 'shared']) const hasStagingAreas = stagingAreas.length > 0 - const [stagingAreaModal, openStagingAreaModal] = React.useState( - false - ) + const [stagingAreaModal, openStagingAreaModal] = useState(false) const stagingAreaLocations = getStagingAreaSlots(stagingAreas) return ( diff --git a/protocol-designer/src/components/modules/TrashModal.tsx b/protocol-designer/src/components/modules/TrashModal.tsx index 7a36b638071..435000a387f 100644 --- a/protocol-designer/src/components/modules/TrashModal.tsx +++ b/protocol-designer/src/components/modules/TrashModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { Controller, useForm, useWatch } from 'react-hook-form' import { useSelector, useDispatch } from 'react-redux' diff --git a/protocol-designer/src/components/modules/__tests__/AdditionalItemsRow.test.tsx b/protocol-designer/src/components/modules/__tests__/AdditionalItemsRow.test.tsx index 2ba6255f63d..93794c89369 100644 --- a/protocol-designer/src/components/modules/__tests__/AdditionalItemsRow.test.tsx +++ b/protocol-designer/src/components/modules/__tests__/AdditionalItemsRow.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, expect, it, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/components/modules/__tests__/CrashInfoBox.test.tsx b/protocol-designer/src/components/modules/__tests__/CrashInfoBox.test.tsx index 76e7fb4483a..b0c7d5ea86a 100644 --- a/protocol-designer/src/components/modules/__tests__/CrashInfoBox.test.tsx +++ b/protocol-designer/src/components/modules/__tests__/CrashInfoBox.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach } from 'vitest' import { screen } from '@testing-library/react' import { CrashInfoBox } from '../CrashInfoBox' diff --git a/protocol-designer/src/components/modules/__tests__/MultipleModuleRow.test.tsx b/protocol-designer/src/components/modules/__tests__/MultipleModuleRow.test.tsx index c756e5bf252..b27dcb3fd79 100644 --- a/protocol-designer/src/components/modules/__tests__/MultipleModuleRow.test.tsx +++ b/protocol-designer/src/components/modules/__tests__/MultipleModuleRow.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/components/modules/__tests__/StagingAreaModal.test.tsx b/protocol-designer/src/components/modules/__tests__/StagingAreaModal.test.tsx index 48ce07638ba..dce60b565c1 100644 --- a/protocol-designer/src/components/modules/__tests__/StagingAreaModal.test.tsx +++ b/protocol-designer/src/components/modules/__tests__/StagingAreaModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, it, expect, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/components/modules/__tests__/StagingAreasRow.test.tsx b/protocol-designer/src/components/modules/__tests__/StagingAreasRow.test.tsx index 609c22f685a..c7b4ad7f1e8 100644 --- a/protocol-designer/src/components/modules/__tests__/StagingAreasRow.test.tsx +++ b/protocol-designer/src/components/modules/__tests__/StagingAreasRow.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/components/modules/__tests__/TrashModal.test.tsx b/protocol-designer/src/components/modules/__tests__/TrashModal.test.tsx index 36cbd8c0df2..7d1fef9ed97 100644 --- a/protocol-designer/src/components/modules/__tests__/TrashModal.test.tsx +++ b/protocol-designer/src/components/modules/__tests__/TrashModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { vi, describe, expect, it, beforeEach } from 'vitest' import { fireEvent, screen, waitFor } from '@testing-library/react' import { WASTE_CHUTE_CUTOUT } from '@opentrons/shared-data' diff --git a/protocol-designer/src/components/portals/MainPageModalPortal.tsx b/protocol-designer/src/components/portals/MainPageModalPortal.tsx index 0419bd44bdb..1a239537e32 100644 --- a/protocol-designer/src/components/portals/MainPageModalPortal.tsx +++ b/protocol-designer/src/components/portals/MainPageModalPortal.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - const PORTAL_ROOT_ID = 'main-page-modal-portal-root' export const getMainPagePortalEl = (): HTMLElement => diff --git a/protocol-designer/src/components/portals/TopPortal.tsx b/protocol-designer/src/components/portals/TopPortal.tsx index 6e503924e6c..6458d7b03ae 100644 --- a/protocol-designer/src/components/portals/TopPortal.tsx +++ b/protocol-designer/src/components/portals/TopPortal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Box } from '@opentrons/components' const PORTAL_ROOT_ID = 'top-portal-root' diff --git a/protocol-designer/src/components/steplist/AspirateDispenseHeader.tsx b/protocol-designer/src/components/steplist/AspirateDispenseHeader.tsx index bbd016b7b8b..e4b92a76e61 100644 --- a/protocol-designer/src/components/steplist/AspirateDispenseHeader.tsx +++ b/protocol-designer/src/components/steplist/AspirateDispenseHeader.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { Icon, diff --git a/protocol-designer/src/components/steplist/CommentStepItems.tsx b/protocol-designer/src/components/steplist/CommentStepItems.tsx index 8e4e4574b0f..de74ba0b2aa 100644 --- a/protocol-designer/src/components/steplist/CommentStepItems.tsx +++ b/protocol-designer/src/components/steplist/CommentStepItems.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import type { CommentArgs } from '@opentrons/step-generation' import styles from './StepItem.module.css' diff --git a/protocol-designer/src/components/steplist/DraggableStepItems.tsx b/protocol-designer/src/components/steplist/DraggableStepItems.tsx index d2f3d5f6c2a..98c21fe32a3 100644 --- a/protocol-designer/src/components/steplist/DraggableStepItems.tsx +++ b/protocol-designer/src/components/steplist/DraggableStepItems.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { useDrop, useDrag } from 'react-dnd' @@ -27,7 +27,7 @@ interface DropType { const DragDropStepItem = (props: DragDropStepItemProps): JSX.Element => { const { stepId, moveStep, findStepIndex, orderedStepIds } = props - const ref = React.useRef(null) + const ref = useRef(null) const [{ isDragging }, drag] = useDrag( () => ({ diff --git a/protocol-designer/src/components/steplist/IngredPill.tsx b/protocol-designer/src/components/steplist/IngredPill.tsx index e9c4c0a7132..ab5227f4529 100644 --- a/protocol-designer/src/components/steplist/IngredPill.tsx +++ b/protocol-designer/src/components/steplist/IngredPill.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { Pill } from '@opentrons/components' import { selectors } from '../../labware-ingred/selectors' diff --git a/protocol-designer/src/components/steplist/LabwareTooltipContents.tsx b/protocol-designer/src/components/steplist/LabwareTooltipContents.tsx index 9926be42c43..9d082038641 100644 --- a/protocol-designer/src/components/steplist/LabwareTooltipContents.tsx +++ b/protocol-designer/src/components/steplist/LabwareTooltipContents.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import styles from './StepItem.module.css' interface LabwareTooltipContentsProps { diff --git a/protocol-designer/src/components/steplist/MixHeader.tsx b/protocol-designer/src/components/steplist/MixHeader.tsx index e8f7252ae54..52b1a9ba23d 100644 --- a/protocol-designer/src/components/steplist/MixHeader.tsx +++ b/protocol-designer/src/components/steplist/MixHeader.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { LegacyTooltip, diff --git a/protocol-designer/src/components/steplist/ModuleStepItems.tsx b/protocol-designer/src/components/steplist/ModuleStepItems.tsx index 82e753e6204..d4f364d9348 100644 --- a/protocol-designer/src/components/steplist/ModuleStepItems.tsx +++ b/protocol-designer/src/components/steplist/ModuleStepItems.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import cx from 'classnames' import { diff --git a/protocol-designer/src/components/steplist/MoveLabwareHeader.tsx b/protocol-designer/src/components/steplist/MoveLabwareHeader.tsx index 12d72c7522e..f3c3c0f7c5c 100644 --- a/protocol-designer/src/components/steplist/MoveLabwareHeader.tsx +++ b/protocol-designer/src/components/steplist/MoveLabwareHeader.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import cx from 'classnames' diff --git a/protocol-designer/src/components/steplist/MultiChannelSubstep.tsx b/protocol-designer/src/components/steplist/MultiChannelSubstep.tsx index f23d32817a5..e2019bfffaa 100644 --- a/protocol-designer/src/components/steplist/MultiChannelSubstep.tsx +++ b/protocol-designer/src/components/steplist/MultiChannelSubstep.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import cx from 'classnames' import { Icon } from '@opentrons/components' @@ -27,9 +27,7 @@ interface MultiChannelSubstepProps { export function MultiChannelSubstep( props: MultiChannelSubstepProps ): JSX.Element { - const [collapsed, setCollapsed] = React.useState( - DEFAULT_COLLAPSED_STATE - ) + const [collapsed, setCollapsed] = useState(DEFAULT_COLLAPSED_STATE) const { rowGroup, diff --git a/protocol-designer/src/components/steplist/PauseStepItems.tsx b/protocol-designer/src/components/steplist/PauseStepItems.tsx index d40d141ff82..ea54cc00cf1 100644 --- a/protocol-designer/src/components/steplist/PauseStepItems.tsx +++ b/protocol-designer/src/components/steplist/PauseStepItems.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styles from './StepItem.module.css' import type { PauseArgs } from '@opentrons/step-generation' diff --git a/protocol-designer/src/components/steplist/PresavedStepItem.tsx b/protocol-designer/src/components/steplist/PresavedStepItem.tsx index 1dd171cd168..edab8dc08dd 100644 --- a/protocol-designer/src/components/steplist/PresavedStepItem.tsx +++ b/protocol-designer/src/components/steplist/PresavedStepItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector, useDispatch } from 'react-redux' import { StepItem } from './StepItem' import { PRESAVED_STEP_ID } from '../../steplist/types' diff --git a/protocol-designer/src/components/steplist/SourceDestSubstep.tsx b/protocol-designer/src/components/steplist/SourceDestSubstep.tsx index 46b0e9348cb..a8079f8597f 100644 --- a/protocol-designer/src/components/steplist/SourceDestSubstep.tsx +++ b/protocol-designer/src/components/steplist/SourceDestSubstep.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import cx from 'classnames' import { MultiChannelSubstep } from './MultiChannelSubstep' diff --git a/protocol-designer/src/components/steplist/StartingDeckStateTerminalItem.tsx b/protocol-designer/src/components/steplist/StartingDeckStateTerminalItem.tsx index 7a4009665ab..cb79594623b 100644 --- a/protocol-designer/src/components/steplist/StartingDeckStateTerminalItem.tsx +++ b/protocol-designer/src/components/steplist/StartingDeckStateTerminalItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { PDListItem } from '../lists' import { START_TERMINAL_TITLE } from '../../constants' diff --git a/protocol-designer/src/components/steplist/StepList.tsx b/protocol-designer/src/components/steplist/StepList.tsx index a6f618bd352..784c1a61eeb 100644 --- a/protocol-designer/src/components/steplist/StepList.tsx +++ b/protocol-designer/src/components/steplist/StepList.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { SidePanel } from '@opentrons/components' @@ -47,7 +47,7 @@ export const StepList = (): JSX.Element => { } } - React.useEffect(() => { + useEffect(() => { const onKeyDown = (e: KeyboardEvent): void => { handleKeyDown(e) } diff --git a/protocol-designer/src/components/steplist/SubstepRow.tsx b/protocol-designer/src/components/steplist/SubstepRow.tsx index 3bc6485734c..f00c23c64e8 100644 --- a/protocol-designer/src/components/steplist/SubstepRow.tsx +++ b/protocol-designer/src/components/steplist/SubstepRow.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { memo, Fragment } from 'react' import { useSelector } from 'react-redux' import map from 'lodash/map' import noop from 'lodash/noop' @@ -81,13 +81,13 @@ export const PillTooltipContents = ( {hasMultipleIngreds && ( - +
{`${props.well} Total Volume`} {formatVolume(totalLiquidVolume, 2)}µl
- + )}
) @@ -178,4 +178,4 @@ function SubstepRowComponent(props: SubstepRowProps): JSX.Element { ) } -export const SubstepRow = React.memo(SubstepRowComponent) +export const SubstepRow = memo(SubstepRowComponent) diff --git a/protocol-designer/src/components/steplist/TerminalItem/TerminalItemLink.tsx b/protocol-designer/src/components/steplist/TerminalItem/TerminalItemLink.tsx index e0486f6a87c..bb9c37ee603 100644 --- a/protocol-designer/src/components/steplist/TerminalItem/TerminalItemLink.tsx +++ b/protocol-designer/src/components/steplist/TerminalItem/TerminalItemLink.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' import { actions as stepsActions } from '../../../ui/steps' diff --git a/protocol-designer/src/components/steplist/TerminalItem/index.tsx b/protocol-designer/src/components/steplist/TerminalItem/index.tsx index 55887d89094..65409a0830d 100644 --- a/protocol-designer/src/components/steplist/TerminalItem/index.tsx +++ b/protocol-designer/src/components/steplist/TerminalItem/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useSelector, useDispatch } from 'react-redux' import { useConditionalConfirm } from '@opentrons/components' import { diff --git a/protocol-designer/src/containers/ConnectedMainPanel.tsx b/protocol-designer/src/containers/ConnectedMainPanel.tsx index ce0f671982b..225f679f353 100644 --- a/protocol-designer/src/containers/ConnectedMainPanel.tsx +++ b/protocol-designer/src/containers/ConnectedMainPanel.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { Splash } from '@opentrons/components' import { START_TERMINAL_ITEM_ID } from '../steplist' diff --git a/protocol-designer/src/containers/ConnectedNav.tsx b/protocol-designer/src/containers/ConnectedNav.tsx index d22fd9420c7..4f3654bb7e4 100644 --- a/protocol-designer/src/containers/ConnectedNav.tsx +++ b/protocol-designer/src/containers/ConnectedNav.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { KNOWLEDGEBASE_ROOT_URL } from '../components/KnowledgeBaseLink' @@ -18,7 +18,7 @@ export function ConnectedNav(): JSX.Element { ) const dispatch = useDispatch() - const handleClick = React.useMemo( + const handleClick = useMemo( () => (pageName: Page) => () => { dispatch(actions.navigateToPage(pageName)) }, diff --git a/protocol-designer/src/containers/ConnectedSidebar.tsx b/protocol-designer/src/containers/ConnectedSidebar.tsx index 914dade085f..9c75187b96c 100644 --- a/protocol-designer/src/containers/ConnectedSidebar.tsx +++ b/protocol-designer/src/containers/ConnectedSidebar.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { selectors } from '../navigation' import { selectors as labwareIngredSelectors } from '../labware-ingred/selectors' diff --git a/protocol-designer/src/containers/ConnectedStepItem.tsx b/protocol-designer/src/containers/ConnectedStepItem.tsx index c6d01af1a6f..3472ba9083e 100644 --- a/protocol-designer/src/containers/ConnectedStepItem.tsx +++ b/protocol-designer/src/containers/ConnectedStepItem.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import uniq from 'lodash/uniq' import UAParser from 'ua-parser-js' diff --git a/protocol-designer/src/containers/ConnectedTitleBar.tsx b/protocol-designer/src/containers/ConnectedTitleBar.tsx index 87a8849c9da..0dc2e536c4c 100644 --- a/protocol-designer/src/containers/ConnectedTitleBar.tsx +++ b/protocol-designer/src/containers/ConnectedTitleBar.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/containers/NavTab.tsx b/protocol-designer/src/containers/NavTab.tsx index a409789b029..e926efc5a64 100644 --- a/protocol-designer/src/containers/NavTab.tsx +++ b/protocol-designer/src/containers/NavTab.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { NavLink } from 'react-router-dom' import classnames from 'classnames' diff --git a/protocol-designer/src/containers/OutsideLinkTab.tsx b/protocol-designer/src/containers/OutsideLinkTab.tsx index 6ebbd5aca35..6582b404112 100644 --- a/protocol-designer/src/containers/OutsideLinkTab.tsx +++ b/protocol-designer/src/containers/OutsideLinkTab.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import { Button, NotificationIcon } from '@opentrons/components' import type { IconName } from '@opentrons/components' diff --git a/protocol-designer/src/containers/TabbedNavBar.tsx b/protocol-designer/src/containers/TabbedNavBar.tsx index a1c3b9cbc74..9bc33656551 100644 --- a/protocol-designer/src/containers/TabbedNavBar.tsx +++ b/protocol-designer/src/containers/TabbedNavBar.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import cx from 'classnames' import styles from './navbar.module.css' diff --git a/protocol-designer/src/containers/__tests__/ConnectedStepItem.test.tsx b/protocol-designer/src/containers/__tests__/ConnectedStepItem.test.tsx index 4ccc84c18dc..01cb48e5bf7 100644 --- a/protocol-designer/src/containers/__tests__/ConnectedStepItem.test.tsx +++ b/protocol-designer/src/containers/__tests__/ConnectedStepItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi } from 'vitest' import { screen } from '@testing-library/react' import '@testing-library/jest-dom/vitest' diff --git a/protocol-designer/src/index.tsx b/protocol-designer/src/index.tsx index 76abd69f796..97314f5e4dc 100644 --- a/protocol-designer/src/index.tsx +++ b/protocol-designer/src/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import ReactDOM from 'react-dom/client' import { Provider, useSelector } from 'react-redux' import { I18nextProvider } from 'react-i18next' diff --git a/protocol-designer/src/molecules/CheckboxStepFormField/index.tsx b/protocol-designer/src/molecules/CheckboxStepFormField/index.tsx index 99511d2461d..4e73119e321 100644 --- a/protocol-designer/src/molecules/CheckboxStepFormField/index.tsx +++ b/protocol-designer/src/molecules/CheckboxStepFormField/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Checkbox, Flex, diff --git a/protocol-designer/src/molecules/DropdownStepFormField/index.tsx b/protocol-designer/src/molecules/DropdownStepFormField/index.tsx index 41faf034b0c..927bee820f8 100644 --- a/protocol-designer/src/molecules/DropdownStepFormField/index.tsx +++ b/protocol-designer/src/molecules/DropdownStepFormField/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { DropdownMenu, Flex, SPACING } from '@opentrons/components' import type { Options } from '@opentrons/components' import type { FieldProps } from '../../pages/Designer/ProtocolSteps/StepForm/types' diff --git a/protocol-designer/src/molecules/SettingsIcon/__tests__/SettingsIcon.test.tsx b/protocol-designer/src/molecules/SettingsIcon/__tests__/SettingsIcon.test.tsx index 5ec0f40d48d..ee2258b0a7c 100644 --- a/protocol-designer/src/molecules/SettingsIcon/__tests__/SettingsIcon.test.tsx +++ b/protocol-designer/src/molecules/SettingsIcon/__tests__/SettingsIcon.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/molecules/SettingsIcon/index.tsx b/protocol-designer/src/molecules/SettingsIcon/index.tsx index accf1fa5720..0953ce992cb 100644 --- a/protocol-designer/src/molecules/SettingsIcon/index.tsx +++ b/protocol-designer/src/molecules/SettingsIcon/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useLocation, useNavigate } from 'react-router-dom' import { diff --git a/protocol-designer/src/organisms/Alerts/ErrorContents.tsx b/protocol-designer/src/organisms/Alerts/ErrorContents.tsx index 20266686d6d..23754599ff4 100644 --- a/protocol-designer/src/organisms/Alerts/ErrorContents.tsx +++ b/protocol-designer/src/organisms/Alerts/ErrorContents.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { START_TERMINAL_ITEM_ID } from '../../steplist' import { KnowledgeBaseLink } from '../../components/KnowledgeBaseLink' diff --git a/protocol-designer/src/organisms/Alerts/FormAlerts.tsx b/protocol-designer/src/organisms/Alerts/FormAlerts.tsx index 90ec773c99b..5aa2833ee60 100644 --- a/protocol-designer/src/organisms/Alerts/FormAlerts.tsx +++ b/protocol-designer/src/organisms/Alerts/FormAlerts.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { memo } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { @@ -162,4 +162,4 @@ function FormAlertsComponent(props: FormAlertsProps): JSX.Element { ) } -export const FormAlerts = React.memo(FormAlertsComponent) +export const FormAlerts = memo(FormAlertsComponent) diff --git a/protocol-designer/src/organisms/Alerts/KnowledgeLink.tsx b/protocol-designer/src/organisms/Alerts/KnowledgeLink.tsx index f953cb9cf64..f29919ba6ce 100644 --- a/protocol-designer/src/organisms/Alerts/KnowledgeLink.tsx +++ b/protocol-designer/src/organisms/Alerts/KnowledgeLink.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Link } from '@opentrons/components' import { links } from './linkConstants' diff --git a/protocol-designer/src/organisms/Alerts/TerminalItemLink.tsx b/protocol-designer/src/organisms/Alerts/TerminalItemLink.tsx index c26580cd1bd..88bacb7e384 100644 --- a/protocol-designer/src/organisms/Alerts/TerminalItemLink.tsx +++ b/protocol-designer/src/organisms/Alerts/TerminalItemLink.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' import { Link } from '@opentrons/components' diff --git a/protocol-designer/src/organisms/Alerts/TimelineAlerts.tsx b/protocol-designer/src/organisms/Alerts/TimelineAlerts.tsx index 1281efefeb1..7e793723acf 100644 --- a/protocol-designer/src/organisms/Alerts/TimelineAlerts.tsx +++ b/protocol-designer/src/organisms/Alerts/TimelineAlerts.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { memo } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' @@ -51,4 +51,4 @@ function TimelineAlertsComponent(): JSX.Element { ) } -export const TimelineAlerts = React.memo(TimelineAlertsComponent) +export const TimelineAlerts = memo(TimelineAlertsComponent) diff --git a/protocol-designer/src/organisms/Alerts/WarningContents.tsx b/protocol-designer/src/organisms/Alerts/WarningContents.tsx index adcee24b13c..559d2d957ce 100644 --- a/protocol-designer/src/organisms/Alerts/WarningContents.tsx +++ b/protocol-designer/src/organisms/Alerts/WarningContents.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { START_TERMINAL_ITEM_ID } from '../../steplist' import { TerminalItemLink } from './TerminalItemLink' diff --git a/protocol-designer/src/organisms/Alerts/__tests__/FormAlerts.test.tsx b/protocol-designer/src/organisms/Alerts/__tests__/FormAlerts.test.tsx index 61779994ec1..edbb682b38c 100644 --- a/protocol-designer/src/organisms/Alerts/__tests__/FormAlerts.test.tsx +++ b/protocol-designer/src/organisms/Alerts/__tests__/FormAlerts.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/organisms/Alerts/__tests__/TimelineAlerts.test.tsx b/protocol-designer/src/organisms/Alerts/__tests__/TimelineAlerts.test.tsx index 9eea32b8434..bf73edde76a 100644 --- a/protocol-designer/src/organisms/Alerts/__tests__/TimelineAlerts.test.tsx +++ b/protocol-designer/src/organisms/Alerts/__tests__/TimelineAlerts.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/organisms/AnnouncementModal/__tests__/AnnouncementModal.test.tsx b/protocol-designer/src/organisms/AnnouncementModal/__tests__/AnnouncementModal.test.tsx index 2b5e693424b..da4929df54d 100644 --- a/protocol-designer/src/organisms/AnnouncementModal/__tests__/AnnouncementModal.test.tsx +++ b/protocol-designer/src/organisms/AnnouncementModal/__tests__/AnnouncementModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { renderWithProviders } from '../../../__testing-utils__' diff --git a/protocol-designer/src/organisms/AnnouncementModal/announcements.tsx b/protocol-designer/src/organisms/AnnouncementModal/announcements.tsx index 68c689cc31a..4115c55198d 100644 --- a/protocol-designer/src/organisms/AnnouncementModal/announcements.tsx +++ b/protocol-designer/src/organisms/AnnouncementModal/announcements.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { css } from 'styled-components' import { diff --git a/protocol-designer/src/organisms/AnnouncementModal/index.tsx b/protocol-designer/src/organisms/AnnouncementModal/index.tsx index ec40fe5bd28..d8e673cfb5b 100644 --- a/protocol-designer/src/organisms/AnnouncementModal/index.tsx +++ b/protocol-designer/src/organisms/AnnouncementModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, @@ -27,10 +27,9 @@ export const AnnouncementModal = (): JSX.Element => { const userHasNotSeenAnnouncement = getLocalStorageItem(localStorageAnnouncementKey) !== announcementKey - const [ - showAnnouncementModal, - setShowAnnouncementModal, - ] = React.useState(userHasNotSeenAnnouncement) + const [showAnnouncementModal, setShowAnnouncementModal] = useState( + userHasNotSeenAnnouncement + ) const handleClick = (): void => { setLocalStorageItem(localStorageAnnouncementKey, announcementKey) diff --git a/protocol-designer/src/organisms/AssignLiquidsModal/LiquidCard.tsx b/protocol-designer/src/organisms/AssignLiquidsModal/LiquidCard.tsx index 321213fe1f9..d1680010e2d 100644 --- a/protocol-designer/src/organisms/AssignLiquidsModal/LiquidCard.tsx +++ b/protocol-designer/src/organisms/AssignLiquidsModal/LiquidCard.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { @@ -29,7 +29,7 @@ export function LiquidCard(props: LiquidCardProps): JSX.Element { const { info } = props const { name, color, liquidIndex } = info const { t } = useTranslation('liquids') - const [isExpanded, setIsExpanded] = React.useState(false) + const [isExpanded, setIsExpanded] = useState(false) const labwareId = useSelector(labwareIngredSelectors.getSelectedLabwareId) const labwareEntities = useSelector(getLabwareEntities) const selectedLabwareDef = diff --git a/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx b/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx index 997bdfa849b..be1ebed220f 100644 --- a/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx +++ b/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { Controller, useForm } from 'react-hook-form' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/organisms/AssignLiquidsModal/index.tsx b/protocol-designer/src/organisms/AssignLiquidsModal/index.tsx index 6db4309a9f7..71072875466 100644 --- a/protocol-designer/src/organisms/AssignLiquidsModal/index.tsx +++ b/protocol-designer/src/organisms/AssignLiquidsModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' @@ -29,9 +29,7 @@ import type { WellGroup } from '@opentrons/components' export function AssignLiquidsModal(): JSX.Element | null { const { t } = useTranslation('liquids') - const [highlightedWells, setHighlightedWells] = React.useState< - WellGroup | {} - >({}) + const [highlightedWells, setHighlightedWells] = useState({}) const navigate = useNavigate() const labwareId = useSelector(selectors.getSelectedLabwareId) const selectedWells = useSelector(getSelectedWells) diff --git a/protocol-designer/src/organisms/DefineLiquidsModal/index.tsx b/protocol-designer/src/organisms/DefineLiquidsModal/index.tsx index f20f9a10072..40f2624e949 100644 --- a/protocol-designer/src/organisms/DefineLiquidsModal/index.tsx +++ b/protocol-designer/src/organisms/DefineLiquidsModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { SketchPicker } from 'react-color' @@ -83,7 +83,7 @@ export function DefineLiquidsModal( const selectedLiquidGroupState = useSelector( labwareIngredSelectors.getSelectedLiquidGroupState ) - const [showColorPicker, setShowColorPicker] = React.useState(false) + const [showColorPicker, setShowColorPicker] = useState(false) const chooseColorWrapperRef = useOnClickOutside({ onClickOutside: () => { setShowColorPicker(false) diff --git a/protocol-designer/src/organisms/EditInstrumentsModal/index.tsx b/protocol-designer/src/organisms/EditInstrumentsModal/index.tsx index 53146ed99f6..b631268ac66 100644 --- a/protocol-designer/src/organisms/EditInstrumentsModal/index.tsx +++ b/protocol-designer/src/organisms/EditInstrumentsModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' @@ -87,12 +87,12 @@ export function EditInstrumentsModal( 'protocol_overview', 'shared', ]) - const [page, setPage] = React.useState<'add' | 'overview'>('overview') - const [mount, setMount] = React.useState('left') - const [pipetteType, setPipetteType] = React.useState(null) - const [pipetteGen, setPipetteGen] = React.useState('flex') - const [pipetteVolume, setPipetteVolume] = React.useState(null) - const [selectedTips, setSelectedTips] = React.useState([]) + const [page, setPage] = useState<'add' | 'overview'>('overview') + const [mount, setMount] = useState('left') + const [pipetteType, setPipetteType] = useState(null) + const [pipetteGen, setPipetteGen] = useState('flex') + const [pipetteVolume, setPipetteVolume] = useState(null) + const [selectedTips, setSelectedTips] = useState([]) const allowAllTipracks = useSelector(getAllowAllTipracks) const robotType = useSelector(getRobotType) const orderedStepIds = useSelector(stepFormSelectors.getOrderedStepIds) diff --git a/protocol-designer/src/organisms/EditNickNameModal/__tests__/EditNickNameModal.test.tsx b/protocol-designer/src/organisms/EditNickNameModal/__tests__/EditNickNameModal.test.tsx index b398564c512..27b8f43b73c 100644 --- a/protocol-designer/src/organisms/EditNickNameModal/__tests__/EditNickNameModal.test.tsx +++ b/protocol-designer/src/organisms/EditNickNameModal/__tests__/EditNickNameModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { i18n } from '../../../assets/localization' diff --git a/protocol-designer/src/organisms/EditNickNameModal/index.tsx b/protocol-designer/src/organisms/EditNickNameModal/index.tsx index ce3c54733f3..bfead26d352 100644 --- a/protocol-designer/src/organisms/EditNickNameModal/index.tsx +++ b/protocol-designer/src/organisms/EditNickNameModal/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' @@ -30,7 +30,7 @@ export function EditNickNameModal(props: EditNickNameModalProps): JSX.Element { const dispatch = useDispatch>() const nickNames = useSelector(uiLabwareSelectors.getLabwareNicknamesById) const savedNickname = nickNames[labwareId] - const [nickName, setNickName] = React.useState(savedNickname) + const [nickName, setNickName] = useState(savedNickname) const saveNickname = (): void => { dispatch(renameLabware({ labwareId, name: nickName })) onClose() diff --git a/protocol-designer/src/organisms/EditProtocolMetadataModal/__tests__/EditProtocolMetadataModal.test.tsx b/protocol-designer/src/organisms/EditProtocolMetadataModal/__tests__/EditProtocolMetadataModal.test.tsx index 60b02251bc3..3d4b8aace51 100644 --- a/protocol-designer/src/organisms/EditProtocolMetadataModal/__tests__/EditProtocolMetadataModal.test.tsx +++ b/protocol-designer/src/organisms/EditProtocolMetadataModal/__tests__/EditProtocolMetadataModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/organisms/EditProtocolMetadataModal/index.tsx b/protocol-designer/src/organisms/EditProtocolMetadataModal/index.tsx index 8bd57308d56..b882508269a 100644 --- a/protocol-designer/src/organisms/EditProtocolMetadataModal/index.tsx +++ b/protocol-designer/src/organisms/EditProtocolMetadataModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' diff --git a/protocol-designer/src/organisms/FileUploadMessagesModal/__tests__/FileUploadMessagesModal.test.tsx b/protocol-designer/src/organisms/FileUploadMessagesModal/__tests__/FileUploadMessagesModal.test.tsx index 9915c380555..6cd7eac5cb1 100644 --- a/protocol-designer/src/organisms/FileUploadMessagesModal/__tests__/FileUploadMessagesModal.test.tsx +++ b/protocol-designer/src/organisms/FileUploadMessagesModal/__tests__/FileUploadMessagesModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { i18n } from '../../../assets/localization' diff --git a/protocol-designer/src/organisms/FileUploadMessagesModal/index.tsx b/protocol-designer/src/organisms/FileUploadMessagesModal/index.tsx index 419863570c1..a4d17a5233c 100644 --- a/protocol-designer/src/organisms/FileUploadMessagesModal/index.tsx +++ b/protocol-designer/src/organisms/FileUploadMessagesModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/organisms/FileUploadMessagesModal/utils.tsx b/protocol-designer/src/organisms/FileUploadMessagesModal/utils.tsx index 7e5069dff77..8b10662278f 100644 --- a/protocol-designer/src/organisms/FileUploadMessagesModal/utils.tsx +++ b/protocol-designer/src/organisms/FileUploadMessagesModal/utils.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { Trans, useTranslation } from 'react-i18next' import { COLORS, diff --git a/protocol-designer/src/organisms/IncompatibleTipsModal/__tests__/IncompatibleTipsModal.test.tsx b/protocol-designer/src/organisms/IncompatibleTipsModal/__tests__/IncompatibleTipsModal.test.tsx index 502bb1b784f..470d2e3880f 100644 --- a/protocol-designer/src/organisms/IncompatibleTipsModal/__tests__/IncompatibleTipsModal.test.tsx +++ b/protocol-designer/src/organisms/IncompatibleTipsModal/__tests__/IncompatibleTipsModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { i18n } from '../../../assets/localization' diff --git a/protocol-designer/src/organisms/IncompatibleTipsModal/index.tsx b/protocol-designer/src/organisms/IncompatibleTipsModal/index.tsx index 1d92a52377a..b509e47ffb0 100644 --- a/protocol-designer/src/organisms/IncompatibleTipsModal/index.tsx +++ b/protocol-designer/src/organisms/IncompatibleTipsModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/organisms/Kitchen/KitchenContext.tsx b/protocol-designer/src/organisms/Kitchen/KitchenContext.tsx index a83276c32f6..12ce3eaa097 100644 --- a/protocol-designer/src/organisms/Kitchen/KitchenContext.tsx +++ b/protocol-designer/src/organisms/Kitchen/KitchenContext.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { createContext } from 'react' import type { SnackbarProps, @@ -25,7 +25,7 @@ export interface KitchenContextType { makeSnackbar: MakeSnackbar } -export const KitchenContext = React.createContext({ +export const KitchenContext = createContext({ eatToast: () => {}, bakeToast: () => '', makeSnackbar: () => {}, diff --git a/protocol-designer/src/organisms/Kitchen/hooks.ts b/protocol-designer/src/organisms/Kitchen/hooks.ts index eb89df2cdb9..0998adc39c8 100644 --- a/protocol-designer/src/organisms/Kitchen/hooks.ts +++ b/protocol-designer/src/organisms/Kitchen/hooks.ts @@ -1,9 +1,9 @@ -import * as React from 'react' +import { useContext } from 'react' import { KitchenContext } from './KitchenContext' import type { KitchenContextType } from './KitchenContext' export function useKitchen(): KitchenContextType { - const { eatToast, bakeToast, makeSnackbar } = React.useContext(KitchenContext) + const { eatToast, bakeToast, makeSnackbar } = useContext(KitchenContext) return { eatToast, bakeToast, makeSnackbar } } diff --git a/protocol-designer/src/organisms/LabwareUploadModal/LabwareUploadModalBody.tsx b/protocol-designer/src/organisms/LabwareUploadModal/LabwareUploadModalBody.tsx index a968ca90de2..e0f0f501b40 100644 --- a/protocol-designer/src/organisms/LabwareUploadModal/LabwareUploadModalBody.tsx +++ b/protocol-designer/src/organisms/LabwareUploadModal/LabwareUploadModalBody.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/protocol-designer/src/organisms/LabwareUploadModal/_tests__/LabwareUploadModal.test.tsx b/protocol-designer/src/organisms/LabwareUploadModal/_tests__/LabwareUploadModal.test.tsx index 94da455a34e..0a7aba37a2f 100644 --- a/protocol-designer/src/organisms/LabwareUploadModal/_tests__/LabwareUploadModal.test.tsx +++ b/protocol-designer/src/organisms/LabwareUploadModal/_tests__/LabwareUploadModal.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { i18n } from '../../../assets/localization' diff --git a/protocol-designer/src/organisms/LabwareUploadModal/index.tsx b/protocol-designer/src/organisms/LabwareUploadModal/index.tsx index 31cd291f4c7..94eb153ab26 100644 --- a/protocol-designer/src/organisms/LabwareUploadModal/index.tsx +++ b/protocol-designer/src/organisms/LabwareUploadModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/organisms/MaterialsListModal/MaterialsListModal.stories.tsx b/protocol-designer/src/organisms/MaterialsListModal/MaterialsListModal.stories.tsx index 2a75c7e76da..36cb4f58efb 100644 --- a/protocol-designer/src/organisms/MaterialsListModal/MaterialsListModal.stories.tsx +++ b/protocol-designer/src/organisms/MaterialsListModal/MaterialsListModal.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { I18nextProvider } from 'react-i18next' import { i18n } from '../../assets/localization' import { MaterialsListModal as MaterialsListModalComponent } from '.' diff --git a/protocol-designer/src/organisms/MaterialsListModal/__tests__/MaterialsListModal.test.tsx b/protocol-designer/src/organisms/MaterialsListModal/__tests__/MaterialsListModal.test.tsx index 9d70b0eb0e3..8785fe748e9 100644 --- a/protocol-designer/src/organisms/MaterialsListModal/__tests__/MaterialsListModal.test.tsx +++ b/protocol-designer/src/organisms/MaterialsListModal/__tests__/MaterialsListModal.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, vi, expect } from 'vitest' import { screen } from '@testing-library/react' diff --git a/protocol-designer/src/organisms/MaterialsListModal/index.tsx b/protocol-designer/src/organisms/MaterialsListModal/index.tsx index 766aac528ef..71ca8b5fb2c 100644 --- a/protocol-designer/src/organisms/MaterialsListModal/index.tsx +++ b/protocol-designer/src/organisms/MaterialsListModal/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { createPortal } from 'react-dom' import { useSelector } from 'react-redux' diff --git a/protocol-designer/src/organisms/PipetteInfoItem/__tests__/PipetteInfoItem.test.tsx b/protocol-designer/src/organisms/PipetteInfoItem/__tests__/PipetteInfoItem.test.tsx index 37a6d0eeba5..8a35eb66e87 100644 --- a/protocol-designer/src/organisms/PipetteInfoItem/__tests__/PipetteInfoItem.test.tsx +++ b/protocol-designer/src/organisms/PipetteInfoItem/__tests__/PipetteInfoItem.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/organisms/PipetteInfoItem/index.tsx b/protocol-designer/src/organisms/PipetteInfoItem/index.tsx index 4628fc7481b..25c9855ea95 100644 --- a/protocol-designer/src/organisms/PipetteInfoItem/index.tsx +++ b/protocol-designer/src/organisms/PipetteInfoItem/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { diff --git a/protocol-designer/src/organisms/ProtocolMetadataNav/index.tsx b/protocol-designer/src/organisms/ProtocolMetadataNav/index.tsx index fdbfe7188b4..c9cab202149 100644 --- a/protocol-designer/src/organisms/ProtocolMetadataNav/index.tsx +++ b/protocol-designer/src/organisms/ProtocolMetadataNav/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { diff --git a/protocol-designer/src/organisms/SlotDetailsContainer/index.tsx b/protocol-designer/src/organisms/SlotDetailsContainer/index.tsx index 06c1add7885..7e2d215cd31 100644 --- a/protocol-designer/src/organisms/SlotDetailsContainer/index.tsx +++ b/protocol-designer/src/organisms/SlotDetailsContainer/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useLocation } from 'react-router-dom' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/organisms/SlotInformation/SlotInformation.stories.tsx b/protocol-designer/src/organisms/SlotInformation/SlotInformation.stories.tsx index 82996f42cbe..98d6132ef23 100644 --- a/protocol-designer/src/organisms/SlotInformation/SlotInformation.stories.tsx +++ b/protocol-designer/src/organisms/SlotInformation/SlotInformation.stories.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Flex } from '@opentrons/components' import { I18nextProvider } from 'react-i18next' import { i18n } from '../../assets/localization' diff --git a/protocol-designer/src/organisms/SlotInformation/__tests__/SlotInformation.test.tsx b/protocol-designer/src/organisms/SlotInformation/__tests__/SlotInformation.test.tsx index 247b96caa74..784590aeb20 100644 --- a/protocol-designer/src/organisms/SlotInformation/__tests__/SlotInformation.test.tsx +++ b/protocol-designer/src/organisms/SlotInformation/__tests__/SlotInformation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, beforeEach, expect, vi } from 'vitest' import { screen } from '@testing-library/react' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/organisms/SlotInformation/index.tsx b/protocol-designer/src/organisms/SlotInformation/index.tsx index 553d5a8a51d..19c4e25f2e5 100644 --- a/protocol-designer/src/organisms/SlotInformation/index.tsx +++ b/protocol-designer/src/organisms/SlotInformation/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useLocation } from 'react-router-dom' import { diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/AddMetadata.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/AddMetadata.tsx index d44823d22c7..a76f7bb4dcb 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/AddMetadata.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/AddMetadata.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/HandleEnter.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/HandleEnter.tsx index a4d07b43a0e..5729f8ceb05 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/HandleEnter.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/HandleEnter.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { HandleKeypress } from '@opentrons/components' interface HandleEnterProps { diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectFixtures.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectFixtures.tsx index 3f041313b77..60805d96a7c 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectFixtures.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectFixtures.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import without from 'lodash/without' import { THERMOCYCLER_MODULE_V2 } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectGripper.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectGripper.tsx index cc3b44a06e9..f4067689fa4 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectGripper.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectGripper.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import without from 'lodash/without' import { @@ -16,9 +16,7 @@ import type { WizardTileProps } from './types' export function SelectGripper(props: WizardTileProps): JSX.Element | null { const { goBack, setValue, proceed, watch } = props const { t } = useTranslation(['create_new_protocol', 'shared']) - const [gripperStatus, setGripperStatus] = React.useState<'yes' | 'no' | null>( - null - ) + const [gripperStatus, setGripperStatus] = useState<'yes' | 'no' | null>(null) const additionalEquipment = watch('additionalEquipment') const handleGripperSelection = (status: 'yes' | 'no'): void => { diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectModules.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectModules.tsx index 8e6f13505c9..cd88e410b17 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectModules.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectModules.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectPipettes.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectPipettes.tsx index 6524a6efbd1..92fd343924f 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectPipettes.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectPipettes.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { useDispatch, useSelector } from 'react-redux' @@ -62,14 +62,12 @@ export function SelectPipettes(props: WizardTileProps): JSX.Element | null { const { makeSnackbar } = useKitchen() const allLabware = useSelector(getLabwareDefsByURI) const dispatch = useDispatch>() - const [mount, setMount] = React.useState(null) - const [page, setPage] = React.useState<'add' | 'overview'>('add') - const [pipetteType, setPipetteType] = React.useState(null) - const [showIncompatibleTip, setIncompatibleTip] = React.useState( - false - ) - const [pipetteGen, setPipetteGen] = React.useState('flex') - const [pipetteVolume, setPipetteVolume] = React.useState(null) + const [mount, setMount] = useState(null) + const [page, setPage] = useState<'add' | 'overview'>('add') + const [pipetteType, setPipetteType] = useState(null) + const [showIncompatibleTip, setIncompatibleTip] = useState(false) + const [pipetteGen, setPipetteGen] = useState('flex') + const [pipetteVolume, setPipetteVolume] = useState(null) const allowAllTipracks = useSelector(getAllowAllTipracks) const allPipetteOptions = getAllPipetteNames('maxVolume', 'channels') const robotType = fields.robotType @@ -89,7 +87,7 @@ export function SelectPipettes(props: WizardTileProps): JSX.Element | null { } // initialize pipette name once all fields are filled out - React.useEffect(() => { + useEffect(() => { if ( (pipetteType != null && pipetteVolume != null && diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectRobot.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectRobot.tsx index 7abc5d2b47d..3d2894bd4a6 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/SelectRobot.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/SelectRobot.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { DIRECTION_COLUMN, diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/WizardBody.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/WizardBody.tsx index 2bee3452bd8..b354ab8fe4a 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/WizardBody.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/WizardBody.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/AddMetadata.test.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/AddMetadata.test.tsx index ffdb008f333..80eac5f4b02 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/AddMetadata.test.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/AddMetadata.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectFixtures.test.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectFixtures.test.tsx index b1be12d64aa..42702c2a507 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectFixtures.test.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectFixtures.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectGripper.test.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectGripper.test.tsx index 9ee7303a360..d6c25eef7d1 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectGripper.test.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectGripper.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectModules.test.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectModules.test.tsx index 24a13089b0e..bddd3174b7f 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectModules.test.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectModules.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectPipettes.test.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectPipettes.test.tsx index a3c2b4429ce..6426b9ee083 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectPipettes.test.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectPipettes.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectRobot.test.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectRobot.test.tsx index 02a07e1ffe6..241fdb159ba 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectRobot.test.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/SelectRobot.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/WizardBody.test.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/WizardBody.test.tsx index 4d873f47c86..085e2e76efc 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/WizardBody.test.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/__tests__/WizardBody.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/CreateNewProtocolWizard/utils.tsx b/protocol-designer/src/pages/CreateNewProtocolWizard/utils.tsx index ebd95b44215..e0a84c1340c 100644 --- a/protocol-designer/src/pages/CreateNewProtocolWizard/utils.tsx +++ b/protocol-designer/src/pages/CreateNewProtocolWizard/utils.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { MAGNETIC_BLOCK_TYPE, STAGING_AREA_CUTOUTS, diff --git a/protocol-designer/src/pages/Designer/DeckSetup/DeckItemHover.tsx b/protocol-designer/src/pages/Designer/DeckSetup/DeckItemHover.tsx index 2dc111d85dd..35961ab04cd 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/DeckItemHover.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/DeckItemHover.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { css } from 'styled-components' diff --git a/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupContainer.tsx b/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupContainer.tsx index 32af97232ad..5308167e7dc 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupContainer.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupContainer.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo, useState, Fragment } from 'react' import { useDispatch, useSelector } from 'react-redux' import { ALIGN_CENTER, @@ -75,10 +75,8 @@ export function DeckSetupContainer(props: DeckSetupTabType): JSX.Element { const zoomIn = useSelector(selectors.getZoomedInSlot) const _disableCollisionWarnings = useSelector(getDisableModuleRestrictions) const robotType = useSelector(getRobotType) - const deckDef = React.useMemo(() => getDeckDefFromRobotType(robotType), [ - robotType, - ]) - const [hoverSlot, setHoverSlot] = React.useState(null) + const deckDef = useMemo(() => getDeckDefFromRobotType(robotType), [robotType]) + const [hoverSlot, setHoverSlot] = useState(null) const trash = Object.values(activeDeckSetup.additionalEquipmentOnDeck).find( ae => ae.name === 'trashBin' ) @@ -112,16 +110,10 @@ export function DeckSetupContainer(props: DeckSetupTabType): JSX.Element { const initialViewBox = `${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}` - const [viewBox, setViewBox] = React.useState(initialViewBox) - const [hoveredLabware, setHoveredLabware] = React.useState( - null - ) - const [hoveredModule, setHoveredModule] = React.useState( - null - ) - const [hoveredFixture, setHoveredFixture] = React.useState( - null - ) + const [viewBox, setViewBox] = useState(initialViewBox) + const [hoveredLabware, setHoveredLabware] = useState(null) + const [hoveredModule, setHoveredModule] = useState(null) + const [hoveredFixture, setHoveredFixture] = useState(null) const addEquipment = (slotId: string): void => { const cutoutId = @@ -153,7 +145,7 @@ export function DeckSetupContainer(props: DeckSetupTabType): JSX.Element { } } - const _hasGen1MultichannelPipette = React.useMemo( + const _hasGen1MultichannelPipette = useMemo( () => getHasGen1MultiChannelPipette(activeDeckSetup.pipettes), [activeDeckSetup.pipettes] ) @@ -250,7 +242,7 @@ export function DeckSetupContainer(props: DeckSetupTabType): JSX.Element { cutoutId != null && (zoomIn.cutout == null || zoomIn.cutout !== cutoutId) ? ( - + - +
) : null ) : null} diff --git a/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupTools.tsx b/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupTools.tsx index f8217fb7506..51fdfdf49da 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupTools.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/DeckSetupTools.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { @@ -80,13 +80,13 @@ export function DeckSetupTools(props: DeckSetupToolsProps): JSX.Element | null { selectedNestedLabwareDefUri, } = selectedSlotInfo const { slot, cutout } = selectedSlot - const [selectedHardware, setHardware] = React.useState< + const [selectedHardware, setHardware] = useState< ModuleModel | Fixture | null >(null) // initialize the previously selected hardware because for some reason it does not // work initiating it in the above useState - React.useEffect(() => { + useEffect(() => { if (selectedModuleModel || selectedFixture) { setHardware(selectedModuleModel ?? selectedFixture ?? null) } @@ -96,7 +96,7 @@ export function DeckSetupTools(props: DeckSetupToolsProps): JSX.Element | null { slot != null ? getModuleModelsBySlot(enableAbsorbanceReader, robotType, slot) : null - const [tab, setTab] = React.useState<'hardware' | 'labware'>( + const [tab, setTab] = useState<'hardware' | 'labware'>( moduleModels?.length === 0 || slot === 'offDeck' ? 'labware' : 'hardware' ) diff --git a/protocol-designer/src/pages/Designer/DeckSetup/FixtureRender.tsx b/protocol-designer/src/pages/Designer/DeckSetup/FixtureRender.tsx index be4130d785a..92803de701f 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/FixtureRender.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/FixtureRender.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { COLORS, FlexTrash, @@ -39,7 +39,7 @@ export const FixtureRender = (props: FixtureRenderProps): JSX.Element => { } case 'trashBin': { return ( - + { trashCutoutId={cutout as TrashCutoutId} backgroundColor={COLORS.grey50} /> - + ) } case 'wasteChute': { diff --git a/protocol-designer/src/pages/Designer/DeckSetup/HoveredItems.tsx b/protocol-designer/src/pages/Designer/DeckSetup/HoveredItems.tsx index 5f54c0967b7..d2497cb200a 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/HoveredItems.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/HoveredItems.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { Fragment } from 'react' import { useSelector } from 'react-redux' import { LabwareRender, Module } from '@opentrons/components' import { @@ -113,7 +113,7 @@ export const HoveredItems = ( hoveredSlotPosition != null && hoveredLabware != null && selectedModuleModel == null ? ( - + @@ -126,7 +126,7 @@ export const HoveredItems = ( position={hoveredSlotPosition} nestedLabwareInfo={nestedInfo} /> - + ) : null} ) diff --git a/protocol-designer/src/pages/Designer/DeckSetup/ModuleLabel.tsx b/protocol-designer/src/pages/Designer/DeckSetup/ModuleLabel.tsx index e527a001d2f..1b8eaa4e73b 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/ModuleLabel.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/ModuleLabel.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect } from 'react' import { DeckLabelSet } from '@opentrons/components' import { HEATERSHAKER_MODULE_TYPE, @@ -26,10 +26,10 @@ export const ModuleLabel = (props: ModuleLabelProps): JSX.Element => { isLast, labwareInfos = [], } = props - const labelContainerRef = React.useRef(null) - const [labelContainerHeight, setLabelContainerHeight] = React.useState(12) + const labelContainerRef = useRef(null) + const [labelContainerHeight, setLabelContainerHeight] = useState(12) - React.useEffect(() => { + useEffect(() => { if (labelContainerRef.current) { setLabelContainerHeight(labelContainerRef.current.offsetHeight) } diff --git a/protocol-designer/src/pages/Designer/DeckSetup/SelectedHoveredItems.tsx b/protocol-designer/src/pages/Designer/DeckSetup/SelectedHoveredItems.tsx index 5982e5b521b..78686519452 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/SelectedHoveredItems.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/SelectedHoveredItems.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { FixtureRender } from './FixtureRender' import { LabwareRender, Module } from '@opentrons/components' diff --git a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupContainer.test.tsx b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupContainer.test.tsx index e0a10672039..eb77c79190a 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupContainer.test.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupContainer.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupTools.test.tsx b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupTools.test.tsx index d8872d540b8..a3d63343389 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupTools.test.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupTools.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/HoveredItems.test.tsx b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/HoveredItems.test.tsx index d07edb6d23c..351cafc6fea 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/HoveredItems.test.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/HoveredItems.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/LabwareTools.test.tsx b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/LabwareTools.test.tsx index a1f1127e5e6..b4d444a1cf3 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/LabwareTools.test.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/LabwareTools.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SelectedHoveredItems.test.tsx b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SelectedHoveredItems.test.tsx index c19a11918b8..7b57073468f 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SelectedHoveredItems.test.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SelectedHoveredItems.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SlotOverflowMenu.test.tsx b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SlotOverflowMenu.test.tsx index 56acf2873d6..42c9c026d70 100644 --- a/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SlotOverflowMenu.test.tsx +++ b/protocol-designer/src/pages/Designer/DeckSetup/__tests__/SlotOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/LabwareLabel.tsx b/protocol-designer/src/pages/Designer/LabwareLabel.tsx index feed9a2c43a..3c85c292071 100644 --- a/protocol-designer/src/pages/Designer/LabwareLabel.tsx +++ b/protocol-designer/src/pages/Designer/LabwareLabel.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useState, useEffect } from 'react' import { DeckLabelSet } from '@opentrons/components' import type { DeckLabelProps } from '@opentrons/components' import type { @@ -21,8 +21,8 @@ export const LabwareLabel = (props: ModuleLabelProps): JSX.Element => { isLast, nestedLabwareInfo = [], } = props - const labelContainerRef = React.useRef(null) - const [labelContainerHeight, setLabelContainerHeight] = React.useState(0) + const labelContainerRef = useRef(null) + const [labelContainerHeight, setLabelContainerHeight] = useState(0) const deckLabels = [ ...nestedLabwareInfo, @@ -33,7 +33,7 @@ export const LabwareLabel = (props: ModuleLabelProps): JSX.Element => { }, ] - React.useEffect(() => { + useEffect(() => { if (labelContainerRef.current) { setLabelContainerHeight(labelContainerRef.current.offsetHeight) } diff --git a/protocol-designer/src/pages/Designer/LiquidsOverflowMenu.tsx b/protocol-designer/src/pages/Designer/LiquidsOverflowMenu.tsx index fb992cab7f0..582232e00ef 100644 --- a/protocol-designer/src/pages/Designer/LiquidsOverflowMenu.tsx +++ b/protocol-designer/src/pages/Designer/LiquidsOverflowMenu.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' diff --git a/protocol-designer/src/pages/Designer/Offdeck/OffDeckDetails.tsx b/protocol-designer/src/pages/Designer/Offdeck/OffDeckDetails.tsx index f5b271ed685..5d83ccb34e0 100644 --- a/protocol-designer/src/pages/Designer/Offdeck/OffDeckDetails.tsx +++ b/protocol-designer/src/pages/Designer/Offdeck/OffDeckDetails.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { @@ -32,10 +32,8 @@ interface OffDeckDetailsProps extends DeckSetupTabType { export function OffDeckDetails(props: OffDeckDetailsProps): JSX.Element { const { addLabware, tab } = props const { t, i18n } = useTranslation('starting_deck_state') - const [hoverSlot, setHoverSlot] = React.useState(null) - const [menuListId, setShowMenuListForId] = React.useState( - null - ) + const [hoverSlot, setHoverSlot] = useState(null) + const [menuListId, setShowMenuListForId] = useState(null) const robotType = useSelector(getRobotType) const deckSetup = useSelector(getDeckSetupForActiveItem) const offDeckLabware = Object.values(deckSetup.labware).filter( diff --git a/protocol-designer/src/pages/Designer/Offdeck/Offdeck.tsx b/protocol-designer/src/pages/Designer/Offdeck/Offdeck.tsx index bc669a3cd37..e76218186eb 100644 --- a/protocol-designer/src/pages/Designer/Offdeck/Offdeck.tsx +++ b/protocol-designer/src/pages/Designer/Offdeck/Offdeck.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { @@ -30,9 +30,7 @@ const STANDARD_Y_HEIGHT = '85.48px' export function OffDeck(props: DeckSetupTabType): JSX.Element { const { tab } = props const { t, i18n } = useTranslation('starting_deck_state') - const [hoveredLabware, setHoveredLabware] = React.useState( - null - ) + const [hoveredLabware, setHoveredLabware] = useState(null) const dispatch = useDispatch() const selectedSlotInfo = useSelector(selectors.getZoomedInSlotInfo) diff --git a/protocol-designer/src/pages/Designer/Offdeck/__tests__/OffDeckDetails.test.tsx b/protocol-designer/src/pages/Designer/Offdeck/__tests__/OffDeckDetails.test.tsx index f3c43ccd436..7eb7e043faf 100644 --- a/protocol-designer/src/pages/Designer/Offdeck/__tests__/OffDeckDetails.test.tsx +++ b/protocol-designer/src/pages/Designer/Offdeck/__tests__/OffDeckDetails.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE, fixture12Trough } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/Designer/Offdeck/__tests__/Offdeck.test.tsx b/protocol-designer/src/pages/Designer/Offdeck/__tests__/Offdeck.test.tsx index b6a3a038239..54edbf8e9ac 100644 --- a/protocol-designer/src/pages/Designer/Offdeck/__tests__/Offdeck.test.tsx +++ b/protocol-designer/src/pages/Designer/Offdeck/__tests__/Offdeck.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx index 7e05439a573..81d06f9884d 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepFormToolbox.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import get from 'lodash/get' import { useTranslation } from 'react-i18next' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/CommentTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/CommentTools/index.tsx index 56299f7ac9b..72688f43146 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/CommentTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/CommentTools/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function CommentTools(): JSX.Element { return
TODO: wire this up
} diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/HeaterShakerTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/HeaterShakerTools/index.tsx index 741d28124fd..686b7a2cdf6 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/HeaterShakerTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/HeaterShakerTools/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function HeaterShakerTools(): JSX.Element { return
TODO: wire this up
} diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MagnetTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MagnetTools/index.tsx index 3d636116f87..660343de340 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MagnetTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MagnetTools/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function MagnetTools(): JSX.Element { return
TODO: wire this up
} diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MixTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MixTools/index.tsx index 8f3b8a826c5..11cb991cf81 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MixTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MixTools/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function MixTools(): JSX.Element { return
TODO: wire this up
} diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/LabwareLocationField.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/LabwareLocationField.tsx index c52afed6898..3dcf96002da 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/LabwareLocationField.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/LabwareLocationField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { getHasWasteChute } from '@opentrons/step-generation' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/MoveLabwareField.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/MoveLabwareField.tsx index fdc24facebd..539905ec4c2 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/MoveLabwareField.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/MoveLabwareField.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { getMoveLabwareOptions } from '../../../../../../ui/labware/selectors' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/index.tsx index db856549b3f..1d654ad0cec 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLabwareTools/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { Box, COLORS, DIRECTION_COLUMN, Flex } from '@opentrons/components' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLiquidTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLiquidTools/index.tsx index 1115172241a..7f284794643 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLiquidTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/MoveLiquidTools/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function MoveLiquidTools(): JSX.Element { return
TODO: wire this up
} diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx index 936fe935a4e..a8a9390d389 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx @@ -1,8 +1,9 @@ -import * as React from 'react' import styled from 'styled-components' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' +import type { ChangeEvent } from 'react' + import { BORDERS, COLORS, @@ -85,7 +86,7 @@ export function PauseTools(props: StepFormProps): JSX.Element { padding={`${SPACING.spacing16} ${SPACING.spacing16} 0 ${SPACING.spacing16}`} > ) => { + onChange={(e: ChangeEvent) => { propsForFields.pauseAction.updateValue(e.currentTarget.value) }} buttonLabel={t( @@ -98,7 +99,7 @@ export function PauseTools(props: StepFormProps): JSX.Element { largeDesktopBorderRadius /> ) => { + onChange={(e: ChangeEvent) => { propsForFields.pauseAction.updateValue(e.currentTarget.value) }} buttonLabel={t( @@ -109,7 +110,7 @@ export function PauseTools(props: StepFormProps): JSX.Element { largeDesktopBorderRadius /> ) => { + onChange={(e: ChangeEvent) => { propsForFields.pauseAction.updateValue(e.currentTarget.value) }} buttonLabel={t( @@ -141,7 +142,7 @@ export function PauseTools(props: StepFormProps): JSX.Element { ) => { + onChange={(e: ChangeEvent) => { propsForFields.pauseTime.updateValue( e.currentTarget.value ) @@ -191,7 +192,7 @@ export function PauseTools(props: StepFormProps): JSX.Element { ) => { + onChange={(e: ChangeEvent) => { propsForFields.pauseTemperature.updateValue( e.currentTarget.value ) @@ -224,7 +225,7 @@ export function PauseTools(props: StepFormProps): JSX.Element { ) => { + onChange={(e: ChangeEvent) => { propsForFields.pauseMessage.updateValue(e.currentTarget.value) }} height="7rem" diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/TemperatureTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/TemperatureTools/index.tsx index ea7c0065077..4607409b9bc 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/TemperatureTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/TemperatureTools/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function TemperatureTools(): JSX.Element { return
TODO: wire this up
} diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/ThermocyclerTools/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/ThermocyclerTools/index.tsx index 6d475a006c6..a19e3fc7cf4 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/ThermocyclerTools/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/ThermocyclerTools/index.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - export function ThermocyclerTools(): JSX.Element { return
TODO: wire this up
} diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/index.tsx index 4f8e428cb52..23dbc6519cd 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { connect } from 'react-redux' import { useConditionalConfirm } from '@opentrons/components' @@ -21,6 +21,7 @@ import { AutoAddPauseUntilHeaterShakerTempStepModal } from '../../../../componen import { getDirtyFields, makeSingleEditFieldProps } from './utils' import { StepFormToolbox } from './StepFormToolbox' +import type { ConnectedComponent } from 'react-redux' import type { InvariantContext } from '@opentrons/step-generation' import type { BaseState, ThunkDispatch } from '../../../../types' import type { @@ -65,8 +66,8 @@ function StepFormManager(props: StepEditFormManagerProps): JSX.Element | null { invariantContext, } = props const { t } = useTranslation('tooltip') - const [focusedField, setFocusedField] = React.useState(null) - const [dirtyFields, setDirtyFields] = React.useState( + const [focusedField, setFocusedField] = useState(null) + const [dirtyFields, setDirtyFields] = useState( getDirtyFields(isNewStep, formData) ) const handleBlur = (fieldName: StepFieldName): void => { @@ -237,7 +238,7 @@ const mapDispatchToProps = (dispatch: ThunkDispatch): DispatchProps => { // It doesn't matter if the children are using connect or useSelector, // only the parent matters.) // https://react-redux.js.org/api/hooks#stale-props-and-zombie-children -export const StepForm = connect( +export const StepForm: ConnectedComponent = connect( mapStateToProps, mapDispatchToProps )((props: StepEditFormManagerProps) => { diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/AddStepOverflowButton.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/AddStepOverflowButton.tsx index 730dc843814..f7901e7e667 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/AddStepOverflowButton.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/AddStepOverflowButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/ConnectedStepInfo.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/ConnectedStepInfo.tsx index 0eb319325cc..fde2e8348e1 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/ConnectedStepInfo.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/ConnectedStepInfo.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { useConditionalConfirm } from '@opentrons/components' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/DraggableSteps.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/DraggableSteps.tsx index 888bee4b8f2..bf92c681796 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/DraggableSteps.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/DraggableSteps.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { useDrop, useDrag } from 'react-dnd' @@ -31,7 +31,7 @@ interface DropType { function DragDropStep(props: DragDropStepProps): JSX.Element { const { stepId, moveStep, findStepIndex, orderedStepIds, stepNumber } = props - const stepRef = React.useRef(null) + const stepRef = useRef(null) const [{ isDragging }, drag] = useDrag( () => ({ diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/PresavedStep.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/PresavedStep.tsx index dad2855e80a..9d0289ddb9c 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/PresavedStep.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/PresavedStep.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector, useDispatch } from 'react-redux' import { useTranslation } from 'react-i18next' import { PRESAVED_STEP_ID } from '../../../../steplist/types' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/StepOverflowMenu.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/StepOverflowMenu.tsx index 8807f54c6af..9aa7185c997 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/StepOverflowMenu.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/StepOverflowMenu.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' import { useDispatch } from 'react-redux' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx index 8f1fbc0dd9a..237f8597103 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TerminalItemStep.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useSelector, useDispatch } from 'react-redux' import { useConditionalConfirm } from '@opentrons/components' import { diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TimelineToolbox.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TimelineToolbox.tsx index 377e5eb3984..caf1c19f740 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TimelineToolbox.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/TimelineToolbox.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { @@ -47,7 +47,7 @@ export const TimelineToolbox = (): JSX.Element => { } } - React.useEffect(() => { + useEffect(() => { const onKeyDown = (e: KeyboardEvent): void => { handleKeyDown(e) } diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/AddStepButton.test.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/AddStepButton.test.tsx index 43b386fb20d..4b7b716b0c7 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/AddStepButton.test.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/AddStepButton.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepContainer.test.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepContainer.test.tsx index 62ed8662131..93ea0baab62 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepContainer.test.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepContainer.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepOverflowMenu.test.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepOverflowMenu.test.tsx index 7188485493e..64208ec1ca2 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepOverflowMenu.test.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/StepOverflowMenu.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/TimelineToolbox.test.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/TimelineToolbox.test.tsx index 3fa3204a1e6..06e1ca068b1 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/TimelineToolbox.test.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/Timeline/__tests__/TimelineToolbox.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { screen } from '@testing-library/react' import { renderWithProviders } from '../../../../../__testing-utils__' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx index 11747efd1ab..b9f0f0a9adb 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/index.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/index.tsx index e933c468d14..e4c6171a9ae 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/index.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { @@ -21,13 +21,13 @@ export function ProtocolSteps(): JSX.Element { const formData = useSelector(getUnsavedForm) const leftString = t('onDeck') const rightString = t('offDeck') - const [deckView, setDeckView] = React.useState< + const [deckView, setDeckView] = useState< typeof leftString | typeof rightString >(leftString) const formType = formData?.stepType - React.useEffect(() => { + useEffect(() => { if (formData != null && formType !== 'moveLabware') { setDeckView(leftString) } diff --git a/protocol-designer/src/pages/Designer/__tests__/Designer.test.tsx b/protocol-designer/src/pages/Designer/__tests__/Designer.test.tsx index 575a96af55c..dfb7f7ea3cd 100644 --- a/protocol-designer/src/pages/Designer/__tests__/Designer.test.tsx +++ b/protocol-designer/src/pages/Designer/__tests__/Designer.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { describe, it, vi, beforeEach, expect } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Designer/index.tsx b/protocol-designer/src/pages/Designer/index.tsx index e92b4b5e76e..e830c59f9b9 100644 --- a/protocol-designer/src/pages/Designer/index.tsx +++ b/protocol-designer/src/pages/Designer/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' @@ -53,19 +53,15 @@ export function Designer(): JSX.Element { const zoomIn = useSelector(selectors.getZoomedInSlot) const deckSetup = useSelector(getDeckSetupForActiveItem) const isNewProtocol = useSelector(selectors.getIsNewProtocol) - const [liquidOverflowMenu, showLiquidOverflowMenu] = React.useState( - false - ) - const [showDefineLiquidModal, setDefineLiquidModal] = React.useState( - false - ) - const [tab, setTab] = React.useState<'startingDeck' | 'protocolSteps'>( + const [liquidOverflowMenu, showLiquidOverflowMenu] = useState(false) + const [showDefineLiquidModal, setDefineLiquidModal] = useState(false) + const [tab, setTab] = useState<'startingDeck' | 'protocolSteps'>( 'startingDeck' ) const leftString = t('onDeck') const rightString = t('offDeck') - const [deckView, setDeckView] = React.useState< + const [deckView, setDeckView] = useState< typeof leftString | typeof rightString >(leftString) @@ -100,7 +96,7 @@ export function Designer(): JSX.Element { Object.values(additionalEquipmentOnDeck).length > 1 // only display toast if its a newly made protocol and has hardware - React.useEffect(() => { + useEffect(() => { if (hasHardware && isNewProtocol) { bakeToast(t('add_rest') as string, INFO_TOAST, { heading: t('we_added_hardware'), @@ -110,7 +106,7 @@ export function Designer(): JSX.Element { } }, []) - React.useEffect(() => { + useEffect(() => { if (fileMetadata?.created == null) { console.warn( 'fileMetadata was refreshed while on the designer page, redirecting to landing page' @@ -134,7 +130,7 @@ export function Designer(): JSX.Element { ) - React.useEffect(() => { + useEffect(() => { if (tab === 'startingDeck') { // ensure that the starting deck page is always showing the initial deck setup dispatch(selectTerminalItem('__initial_setup__')) diff --git a/protocol-designer/src/pages/Landing/__tests__/Landing.test.tsx b/protocol-designer/src/pages/Landing/__tests__/Landing.test.tsx index aad8d261588..ad713cb02fb 100644 --- a/protocol-designer/src/pages/Landing/__tests__/Landing.test.tsx +++ b/protocol-designer/src/pages/Landing/__tests__/Landing.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { describe, it, vi, beforeEach, expect } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { screen, fireEvent } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Liquids/__tests__/Liquids.test.tsx b/protocol-designer/src/pages/Liquids/__tests__/Liquids.test.tsx index 610e1a53540..81c3bc4e58d 100644 --- a/protocol-designer/src/pages/Liquids/__tests__/Liquids.test.tsx +++ b/protocol-designer/src/pages/Liquids/__tests__/Liquids.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { describe, it, vi, beforeEach, expect } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Liquids/index.tsx b/protocol-designer/src/pages/Liquids/index.tsx index e3d1f17c115..8293791f9a7 100644 --- a/protocol-designer/src/pages/Liquids/index.tsx +++ b/protocol-designer/src/pages/Liquids/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { useNavigate } from 'react-router-dom' @@ -27,12 +27,8 @@ export function Liquids(): JSX.Element { const selectedLabware = useSelector( labwareIngredSelectors.getSelectedLabwareId ) - const [liquidOverflowMenu, showLiquidOverflowMenu] = React.useState( - false - ) - const [showDefineLiquidModal, setDefineLiquidModal] = React.useState( - false - ) + const [liquidOverflowMenu, showLiquidOverflowMenu] = useState(false) + const [showDefineLiquidModal, setDefineLiquidModal] = useState(false) const overflowWrapperRef = useOnClickOutside({ onClickOutside: () => { if (!showDefineLiquidModal) { @@ -41,7 +37,7 @@ export function Liquids(): JSX.Element { }, }) - React.useEffect(() => { + useEffect(() => { if (selectedLabware == null) { console.warn('selectedLabware was lost, navigate to deisgner page') navigate('/designer') diff --git a/protocol-designer/src/pages/ProtocolOverview/OffdeckThumbnail.tsx b/protocol-designer/src/pages/ProtocolOverview/OffdeckThumbnail.tsx index b3d311845ce..0bf098e51cc 100644 --- a/protocol-designer/src/pages/ProtocolOverview/OffdeckThumbnail.tsx +++ b/protocol-designer/src/pages/ProtocolOverview/OffdeckThumbnail.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' import { diff --git a/protocol-designer/src/pages/ProtocolOverview/UnusedModalContent.tsx b/protocol-designer/src/pages/ProtocolOverview/UnusedModalContent.tsx index f59f29044f5..9e31b59c280 100644 --- a/protocol-designer/src/pages/ProtocolOverview/UnusedModalContent.tsx +++ b/protocol-designer/src/pages/ProtocolOverview/UnusedModalContent.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import type { ModuleOnDeck, PipetteOnDeck } from '../../step-forms' import type { Fixture } from './index' diff --git a/protocol-designer/src/pages/ProtocolOverview/__tests__/DeckThumbnail.test.tsx b/protocol-designer/src/pages/ProtocolOverview/__tests__/DeckThumbnail.test.tsx index 8fdd677560a..549f1c37198 100644 --- a/protocol-designer/src/pages/ProtocolOverview/__tests__/DeckThumbnail.test.tsx +++ b/protocol-designer/src/pages/ProtocolOverview/__tests__/DeckThumbnail.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import '@testing-library/jest-dom/vitest' import { screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/ProtocolOverview/__tests__/OffdeckThumbnail.test.tsx b/protocol-designer/src/pages/ProtocolOverview/__tests__/OffdeckThumbnail.test.tsx index 1a262365f4e..ce96b79923a 100644 --- a/protocol-designer/src/pages/ProtocolOverview/__tests__/OffdeckThumbnail.test.tsx +++ b/protocol-designer/src/pages/ProtocolOverview/__tests__/OffdeckThumbnail.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach } from 'vitest' import '@testing-library/jest-dom/vitest' import { FLEX_ROBOT_TYPE, fixture12Trough } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/ProtocolOverview/__tests__/ProtocolOverview.test.tsx b/protocol-designer/src/pages/ProtocolOverview/__tests__/ProtocolOverview.test.tsx index edbde2d96d2..e77515eaba0 100644 --- a/protocol-designer/src/pages/ProtocolOverview/__tests__/ProtocolOverview.test.tsx +++ b/protocol-designer/src/pages/ProtocolOverview/__tests__/ProtocolOverview.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { fireEvent, screen } from '@testing-library/react' import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' diff --git a/protocol-designer/src/pages/ProtocolOverview/index.tsx b/protocol-designer/src/pages/ProtocolOverview/index.tsx index 818a5b5a0c7..92c2ec27724 100644 --- a/protocol-designer/src/pages/ProtocolOverview/index.tsx +++ b/protocol-designer/src/pages/ProtocolOverview/index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useState, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { useDispatch, useSelector } from 'react-redux' @@ -91,15 +91,13 @@ export function ProtocolOverview(): JSX.Element { const [ showEditInstrumentsModal, setShowEditInstrumentsModal, - ] = React.useState(false) - const [ - showEditMetadataModal, - setShowEditMetadataModal, - ] = React.useState(false) - const [ - showExportWarningModal, - setShowExportWarningModal, - ] = React.useState(false) + ] = useState(false) + const [showEditMetadataModal, setShowEditMetadataModal] = useState( + false + ) + const [showExportWarningModal, setShowExportWarningModal] = useState( + false + ) const formValues = useSelector(fileSelectors.getFileMetadata) const robotType = useSelector(fileSelectors.getRobotType) const initialDeckSetup = useSelector(getInitialDeckSetup) @@ -107,11 +105,10 @@ export function ProtocolOverview(): JSX.Element { labwareIngredSelectors.allIngredientGroupFields ) const dispatch: ThunkDispatch = useDispatch() - const [hover, setHover] = React.useState(null) - const [ - showMaterialsListModal, - setShowMaterialsListModal, - ] = React.useState(false) + const [hover, setHover] = useState(null) + const [showMaterialsListModal, setShowMaterialsListModal] = useState( + false + ) const fileData = useSelector(fileSelectors.createFile) const savedStepForms = useSelector(stepFormSelectors.getSavedStepForms) const additionalEquipment = useSelector(getAdditionalEquipmentEntities) @@ -121,11 +118,11 @@ export function ProtocolOverview(): JSX.Element { const leftString = t('starting_deck_state:onDeck') const rightString = t('starting_deck_state:offDeck') - const [deckView, setDeckView] = React.useState< + const [deckView, setDeckView] = useState< typeof leftString | typeof rightString >(leftString) - React.useEffect(() => { + useEffect(() => { if (formValues?.created == null) { console.warn( 'formValues was refreshed while on the overview page, redirecting to landing page' diff --git a/protocol-designer/src/pages/Settings/__tests__/Settings.test.tsx b/protocol-designer/src/pages/Settings/__tests__/Settings.test.tsx index 787cb3c6e4a..e73034fe4d8 100644 --- a/protocol-designer/src/pages/Settings/__tests__/Settings.test.tsx +++ b/protocol-designer/src/pages/Settings/__tests__/Settings.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { describe, it, vi, beforeEach, expect } from 'vitest' import { MemoryRouter } from 'react-router-dom' import { fireEvent, screen } from '@testing-library/react' diff --git a/protocol-designer/src/pages/Settings/index.tsx b/protocol-designer/src/pages/Settings/index.tsx index 2baa3167ba9..14c1aa488e6 100644 --- a/protocol-designer/src/pages/Settings/index.tsx +++ b/protocol-designer/src/pages/Settings/index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' import { css } from 'styled-components' diff --git a/protocol-designer/src/steplist/formLevel/warnings.tsx b/protocol-designer/src/steplist/formLevel/warnings.tsx index 04adce823e9..ef9e5a62603 100644 --- a/protocol-designer/src/steplist/formLevel/warnings.tsx +++ b/protocol-designer/src/steplist/formLevel/warnings.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { getWellTotalVolume } from '@opentrons/shared-data' import { KnowledgeBaseLink } from '../../components/KnowledgeBaseLink' import type { FormError } from './errors' diff --git a/react-api-client/src/api/ApiClientProvider.tsx b/react-api-client/src/api/ApiClientProvider.tsx index a20c36c452d..e1a33c4b8c1 100644 --- a/react-api-client/src/api/ApiClientProvider.tsx +++ b/react-api-client/src/api/ApiClientProvider.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { QueryClient, QueryClientProvider } from 'react-query' const queryClient = new QueryClient({ diff --git a/react-api-client/src/api/__tests__/useHost.test.tsx b/react-api-client/src/api/__tests__/useHost.test.tsx index 3ff76a3e94c..784df8090fb 100644 --- a/react-api-client/src/api/__tests__/useHost.test.tsx +++ b/react-api-client/src/api/__tests__/useHost.test.tsx @@ -1,5 +1,5 @@ // tests for the HostConfig context and hook -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect } from 'vitest' import { renderHook } from '@testing-library/react' diff --git a/react-api-client/src/calibration/__tests__/useDeleteCalibrationMutation.test.tsx b/react-api-client/src/calibration/__tests__/useDeleteCalibrationMutation.test.tsx index 6639f2dd25f..5d94b3bdad5 100644 --- a/react-api-client/src/calibration/__tests__/useDeleteCalibrationMutation.test.tsx +++ b/react-api-client/src/calibration/__tests__/useDeleteCalibrationMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/dataFiles/__tests__/useCsvFileQuery.test.tsx b/react-api-client/src/dataFiles/__tests__/useCsvFileQuery.test.tsx index 83e7e0be504..2d140d759e3 100644 --- a/react-api-client/src/dataFiles/__tests__/useCsvFileQuery.test.tsx +++ b/react-api-client/src/dataFiles/__tests__/useCsvFileQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/dataFiles/__tests__/useCsvFileRawQuery.test.tsx b/react-api-client/src/dataFiles/__tests__/useCsvFileRawQuery.test.tsx index e24ff3d6a82..ba2540b8dfc 100644 --- a/react-api-client/src/dataFiles/__tests__/useCsvFileRawQuery.test.tsx +++ b/react-api-client/src/dataFiles/__tests__/useCsvFileRawQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/dataFiles/__tests__/useUploadCsvFileMutation.test.tsx b/react-api-client/src/dataFiles/__tests__/useUploadCsvFileMutation.test.tsx index 1b21e6b0c06..5523a8c4a1e 100644 --- a/react-api-client/src/dataFiles/__tests__/useUploadCsvFileMutation.test.tsx +++ b/react-api-client/src/dataFiles/__tests__/useUploadCsvFileMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/health/__tests__/useHealth.test.tsx b/react-api-client/src/health/__tests__/useHealth.test.tsx index d824dac8850..bdc6935eacb 100644 --- a/react-api-client/src/health/__tests__/useHealth.test.tsx +++ b/react-api-client/src/health/__tests__/useHealth.test.tsx @@ -1,5 +1,5 @@ // tests for the useHealth hooks -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceCommandMutation.test.tsx b/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceCommandMutation.test.tsx index 55b66892a8d..cd0e2b6e6ec 100644 --- a/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceCommandMutation.test.tsx +++ b/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceCommandMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceRunMutation.test.tsx b/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceRunMutation.test.tsx index d358868cfdb..68ea8ee7213 100644 --- a/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceRunMutation.test.tsx +++ b/react-api-client/src/maintenance_runs/__tests__/useCreateMaintenanceRunMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/maintenance_runs/__tests__/useDeleteMaintenanceRunMutation.test.tsx b/react-api-client/src/maintenance_runs/__tests__/useDeleteMaintenanceRunMutation.test.tsx index c40aad644e2..1df5ffd0856 100644 --- a/react-api-client/src/maintenance_runs/__tests__/useDeleteMaintenanceRunMutation.test.tsx +++ b/react-api-client/src/maintenance_runs/__tests__/useDeleteMaintenanceRunMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/maintenance_runs/__tests__/useMaintenanceRunQuery.test.tsx b/react-api-client/src/maintenance_runs/__tests__/useMaintenanceRunQuery.test.tsx index 1c31a9cfd36..10014aa3c4f 100644 --- a/react-api-client/src/maintenance_runs/__tests__/useMaintenanceRunQuery.test.tsx +++ b/react-api-client/src/maintenance_runs/__tests__/useMaintenanceRunQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/modules/__tests__/useModulesQuery.test.tsx b/react-api-client/src/modules/__tests__/useModulesQuery.test.tsx index 5d0f3d9e238..406808bcb13 100644 --- a/react-api-client/src/modules/__tests__/useModulesQuery.test.tsx +++ b/react-api-client/src/modules/__tests__/useModulesQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/pipettes/__tests__/usePipettesQuery.test.tsx b/react-api-client/src/pipettes/__tests__/usePipettesQuery.test.tsx index d243b00ea09..31629487062 100644 --- a/react-api-client/src/pipettes/__tests__/usePipettesQuery.test.tsx +++ b/react-api-client/src/pipettes/__tests__/usePipettesQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/pipettes/__tests__/usePipettesSettingsQuery.test.tsx b/react-api-client/src/pipettes/__tests__/usePipettesSettingsQuery.test.tsx index 5b3b29e6363..2d801d9d914 100644 --- a/react-api-client/src/pipettes/__tests__/usePipettesSettingsQuery.test.tsx +++ b/react-api-client/src/pipettes/__tests__/usePipettesSettingsQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/protocols/__tests__/useAllCsvFilesQuery.test.tsx b/react-api-client/src/protocols/__tests__/useAllCsvFilesQuery.test.tsx index 15e4ceed542..0e68117b1ff 100644 --- a/react-api-client/src/protocols/__tests__/useAllCsvFilesQuery.test.tsx +++ b/react-api-client/src/protocols/__tests__/useAllCsvFilesQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, vi, beforeEach, expect } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook /** waitFor */ } from '@testing-library/react' diff --git a/react-api-client/src/protocols/__tests__/useAllProtocolsQuery.test.tsx b/react-api-client/src/protocols/__tests__/useAllProtocolsQuery.test.tsx index ca2c79208ad..89b496381cc 100644 --- a/react-api-client/src/protocols/__tests__/useAllProtocolsQuery.test.tsx +++ b/react-api-client/src/protocols/__tests__/useAllProtocolsQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/protocols/__tests__/useCreateProtocolAnalysisMutation.test.tsx b/react-api-client/src/protocols/__tests__/useCreateProtocolAnalysisMutation.test.tsx index e04c020fb1d..5095839c27c 100644 --- a/react-api-client/src/protocols/__tests__/useCreateProtocolAnalysisMutation.test.tsx +++ b/react-api-client/src/protocols/__tests__/useCreateProtocolAnalysisMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/protocols/__tests__/useCreateProtocolMutation.test.tsx b/react-api-client/src/protocols/__tests__/useCreateProtocolMutation.test.tsx index 817f88bebf7..d1bdaa0e94e 100644 --- a/react-api-client/src/protocols/__tests__/useCreateProtocolMutation.test.tsx +++ b/react-api-client/src/protocols/__tests__/useCreateProtocolMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/protocols/__tests__/useDeleteProtocol.test.tsx b/react-api-client/src/protocols/__tests__/useDeleteProtocol.test.tsx index 7d7e01589f1..d3b830a9d63 100644 --- a/react-api-client/src/protocols/__tests__/useDeleteProtocol.test.tsx +++ b/react-api-client/src/protocols/__tests__/useDeleteProtocol.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/protocols/__tests__/useProtocolQuery.test.tsx b/react-api-client/src/protocols/__tests__/useProtocolQuery.test.tsx index b5f3450145a..cbcf71ed13e 100644 --- a/react-api-client/src/protocols/__tests__/useProtocolQuery.test.tsx +++ b/react-api-client/src/protocols/__tests__/useProtocolQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/robot/__tests__/useAcknowledgeEstopDisengageMutation.test.tsx b/react-api-client/src/robot/__tests__/useAcknowledgeEstopDisengageMutation.test.tsx index 0af059b5cf2..08c4401856a 100644 --- a/react-api-client/src/robot/__tests__/useAcknowledgeEstopDisengageMutation.test.tsx +++ b/react-api-client/src/robot/__tests__/useAcknowledgeEstopDisengageMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/robot/__tests__/useDoorQuery.test.tsx b/react-api-client/src/robot/__tests__/useDoorQuery.test.tsx index 57b52eee59d..55bf2961c9d 100644 --- a/react-api-client/src/robot/__tests__/useDoorQuery.test.tsx +++ b/react-api-client/src/robot/__tests__/useDoorQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/robot/__tests__/useEstopQuery.test.tsx b/react-api-client/src/robot/__tests__/useEstopQuery.test.tsx index ae56f3a6175..569a270c516 100644 --- a/react-api-client/src/robot/__tests__/useEstopQuery.test.tsx +++ b/react-api-client/src/robot/__tests__/useEstopQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/robot/__tests__/useLightsQuery.test.tsx b/react-api-client/src/robot/__tests__/useLightsQuery.test.tsx index a175f10d9a6..1ce0a9872e6 100644 --- a/react-api-client/src/robot/__tests__/useLightsQuery.test.tsx +++ b/react-api-client/src/robot/__tests__/useLightsQuery.test.tsx @@ -1,5 +1,5 @@ // tests for the useLights hooks -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' diff --git a/react-api-client/src/robot/__tests__/useRobotSettingsQuery.test.tsx b/react-api-client/src/robot/__tests__/useRobotSettingsQuery.test.tsx index 2f980be9473..f142685dcf1 100644 --- a/react-api-client/src/robot/__tests__/useRobotSettingsQuery.test.tsx +++ b/react-api-client/src/robot/__tests__/useRobotSettingsQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useAllCommandsQuery.test.tsx b/react-api-client/src/runs/__tests__/useAllCommandsQuery.test.tsx index 857490535c7..a3d21e10d56 100644 --- a/react-api-client/src/runs/__tests__/useAllCommandsQuery.test.tsx +++ b/react-api-client/src/runs/__tests__/useAllCommandsQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useAllRunsQuery.test.tsx b/react-api-client/src/runs/__tests__/useAllRunsQuery.test.tsx index 4813f23d97a..81615655d75 100644 --- a/react-api-client/src/runs/__tests__/useAllRunsQuery.test.tsx +++ b/react-api-client/src/runs/__tests__/useAllRunsQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useCommandQuery.test.tsx b/react-api-client/src/runs/__tests__/useCommandQuery.test.tsx index 675b0154830..2b93f597118 100644 --- a/react-api-client/src/runs/__tests__/useCommandQuery.test.tsx +++ b/react-api-client/src/runs/__tests__/useCommandQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useCreateCommandMutation.test.tsx b/react-api-client/src/runs/__tests__/useCreateCommandMutation.test.tsx index acab9f211ac..3cff2fb4717 100644 --- a/react-api-client/src/runs/__tests__/useCreateCommandMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useCreateCommandMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useCreateLabwareDefinitionMutation.test.tsx b/react-api-client/src/runs/__tests__/useCreateLabwareDefinitionMutation.test.tsx index 8aee54a6191..cf78479286d 100644 --- a/react-api-client/src/runs/__tests__/useCreateLabwareDefinitionMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useCreateLabwareDefinitionMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useCreateLabwareOffsetsMutation.test.tsx b/react-api-client/src/runs/__tests__/useCreateLabwareOffsetsMutation.test.tsx index 94c89efb1eb..beb57a9ca72 100644 --- a/react-api-client/src/runs/__tests__/useCreateLabwareOffsetsMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useCreateLabwareOffsetsMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useCreateLiveCommandMutation.test.tsx b/react-api-client/src/runs/__tests__/useCreateLiveCommandMutation.test.tsx index 977dbfbcdaa..f4d1d5c5fec 100644 --- a/react-api-client/src/runs/__tests__/useCreateLiveCommandMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useCreateLiveCommandMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useCreateRunMutation.test.tsx b/react-api-client/src/runs/__tests__/useCreateRunMutation.test.tsx index 87d5920f838..b822b0dc3ab 100644 --- a/react-api-client/src/runs/__tests__/useCreateRunMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useCreateRunMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useDismissCurrentRunMutation.test.tsx b/react-api-client/src/runs/__tests__/useDismissCurrentRunMutation.test.tsx index 8b416ebdcd3..85040fa02d1 100644 --- a/react-api-client/src/runs/__tests__/useDismissCurrentRunMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useDismissCurrentRunMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/usePauseRunMutation.test.tsx b/react-api-client/src/runs/__tests__/usePauseRunMutation.test.tsx index b6c8932a12c..9cf8b6de84d 100644 --- a/react-api-client/src/runs/__tests__/usePauseRunMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/usePauseRunMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/usePlayRunMutation.test.tsx b/react-api-client/src/runs/__tests__/usePlayRunMutation.test.tsx index 59dee2007d9..8a95361d3f7 100644 --- a/react-api-client/src/runs/__tests__/usePlayRunMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/usePlayRunMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useResumeRunFromRecoveryMutation.test.tsx b/react-api-client/src/runs/__tests__/useResumeRunFromRecoveryMutation.test.tsx index a3ebe42a73d..cf9794c0dd8 100644 --- a/react-api-client/src/runs/__tests__/useResumeRunFromRecoveryMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useResumeRunFromRecoveryMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useRunActionMutations.test.tsx b/react-api-client/src/runs/__tests__/useRunActionMutations.test.tsx index 6bf609276be..7b40e4fc88e 100644 --- a/react-api-client/src/runs/__tests__/useRunActionMutations.test.tsx +++ b/react-api-client/src/runs/__tests__/useRunActionMutations.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useRunQuery.test.tsx b/react-api-client/src/runs/__tests__/useRunQuery.test.tsx index bb8701d8e1c..07d403dddf1 100644 --- a/react-api-client/src/runs/__tests__/useRunQuery.test.tsx +++ b/react-api-client/src/runs/__tests__/useRunQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/runs/__tests__/useStopRunMutation.test.tsx b/react-api-client/src/runs/__tests__/useStopRunMutation.test.tsx index 04dd2895bc0..5539a84443b 100644 --- a/react-api-client/src/runs/__tests__/useStopRunMutation.test.tsx +++ b/react-api-client/src/runs/__tests__/useStopRunMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/server/__tests__/useUpdateRobotNameMutation.test.tsx b/react-api-client/src/server/__tests__/useUpdateRobotNameMutation.test.tsx index b58acdce4aa..3907192b169 100644 --- a/react-api-client/src/server/__tests__/useUpdateRobotNameMutation.test.tsx +++ b/react-api-client/src/server/__tests__/useUpdateRobotNameMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/sessions/__tests__/useAllSessionsQuery.test.tsx b/react-api-client/src/sessions/__tests__/useAllSessionsQuery.test.tsx index 45d9eae6484..a734bafcb4a 100644 --- a/react-api-client/src/sessions/__tests__/useAllSessionsQuery.test.tsx +++ b/react-api-client/src/sessions/__tests__/useAllSessionsQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/sessions/__tests__/useCreateSessionMutation.test.tsx b/react-api-client/src/sessions/__tests__/useCreateSessionMutation.test.tsx index 982c2049200..ece5852f846 100644 --- a/react-api-client/src/sessions/__tests__/useCreateSessionMutation.test.tsx +++ b/react-api-client/src/sessions/__tests__/useCreateSessionMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/sessions/__tests__/useSessionQuery.test.tsx b/react-api-client/src/sessions/__tests__/useSessionQuery.test.tsx index cf3cf5a82b9..cc26c726f3f 100644 --- a/react-api-client/src/sessions/__tests__/useSessionQuery.test.tsx +++ b/react-api-client/src/sessions/__tests__/useSessionQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/sessions/__tests__/useSessionsByTypeQuery.test.tsx b/react-api-client/src/sessions/__tests__/useSessionsByTypeQuery.test.tsx index aec72b3c8ba..ce52489363a 100644 --- a/react-api-client/src/sessions/__tests__/useSessionsByTypeQuery.test.tsx +++ b/react-api-client/src/sessions/__tests__/useSessionsByTypeQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/subsystems/__tests__/useAllCurrentSubsystemUpdateQuery.test.tsx b/react-api-client/src/subsystems/__tests__/useAllCurrentSubsystemUpdateQuery.test.tsx index b9a6dd2e9c0..c45e0747a50 100644 --- a/react-api-client/src/subsystems/__tests__/useAllCurrentSubsystemUpdateQuery.test.tsx +++ b/react-api-client/src/subsystems/__tests__/useAllCurrentSubsystemUpdateQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/subsystems/__tests__/useCurrentSubsystemUpdateQuery.test.tsx b/react-api-client/src/subsystems/__tests__/useCurrentSubsystemUpdateQuery.test.tsx index e6fa1a69a17..90db04417e6 100644 --- a/react-api-client/src/subsystems/__tests__/useCurrentSubsystemUpdateQuery.test.tsx +++ b/react-api-client/src/subsystems/__tests__/useCurrentSubsystemUpdateQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/subsystems/__tests__/useSubsystemUpdateQuery.test.tsx b/react-api-client/src/subsystems/__tests__/useSubsystemUpdateQuery.test.tsx index 7c83c869730..787e6ce7d36 100644 --- a/react-api-client/src/subsystems/__tests__/useSubsystemUpdateQuery.test.tsx +++ b/react-api-client/src/subsystems/__tests__/useSubsystemUpdateQuery.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/subsystems/__tests__/useUpdateSubsystemMutation.test.tsx b/react-api-client/src/subsystems/__tests__/useUpdateSubsystemMutation.test.tsx index f2f88a1e2f3..55b9edb07d5 100644 --- a/react-api-client/src/subsystems/__tests__/useUpdateSubsystemMutation.test.tsx +++ b/react-api-client/src/subsystems/__tests__/useUpdateSubsystemMutation.test.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import type * as React from 'react' import { describe, it, expect, beforeEach, vi } from 'vitest' import { QueryClient, QueryClientProvider } from 'react-query' import { act, renderHook, waitFor } from '@testing-library/react' diff --git a/react-api-client/src/system/useAuthorization.ts b/react-api-client/src/system/useAuthorization.ts index db793536db3..fbc3d93c626 100644 --- a/react-api-client/src/system/useAuthorization.ts +++ b/react-api-client/src/system/useAuthorization.ts @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef, useEffect } from 'react' import { createAuthorization, createRegistration } from '@opentrons/api-client' import { useHost } from '../api' @@ -19,10 +19,10 @@ export function useAuthorization( ): UseAuthorizationResult { const host = useHost() // TODO(bh, 2023-05-31): refactor individual calls to react-query and separate mutations, consider moving this hook to app - const registrationToken = React.useRef(null) - const authorizationToken = React.useRef(null) + const registrationToken = useRef(null) + const authorizationToken = useRef(null) - React.useEffect(() => { + useEffect(() => { createRegistration(host as HostConfig, createRegistrationParams) .then(response => { registrationToken.current = response.data