Skip to content

Commit

Permalink
refactor(app): rename error recovery "hooks" dir to "utils"
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Jun 18, 2024
1 parent ae062f2 commit 46cb0e4
Show file tree
Hide file tree
Showing 29 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/src/organisms/DropTipWizardFlows/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { DT_ROUTES } from './constants'
import type { DropTipErrorComponents } from './hooks'
import type { DropTipWizardProps } from './DropTipWizard'
import type { ERUtilsResults } from '../ErrorRecoveryFlows/hooks'
import type { ERUtilsResults } from '../ErrorRecoveryFlows/utils'

export type DropTipFlowsRoute = typeof DT_ROUTES[keyof typeof DT_ROUTES]
export type DropTipFlowsStep = DropTipFlowsRoute[number]
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ManageTips,
} from './RecoveryOptions'
import { RecoveryInProgress } from './RecoveryInProgress'
import { getErrorKind } from './hooks'
import { getErrorKind } from './utils'
import { RECOVERY_MAP } from './constants'

import type { RobotType } from '@opentrons/shared-data'
Expand All @@ -27,7 +27,7 @@ import type {
useRouteUpdateActions,
useRecoveryCommands,
ERUtilsResults,
} from './hooks'
} from './utils'
import type { ErrorRecoveryFlowsProps } from '.'

interface UseERWizardResult {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type {
RecoveryTipStatusUtils,
UseRecoveryCommandsResult,
UseRouteUpdateActionsResult,
} from '../hooks'
} from '../utils'

export function CancelRun({
isOnDevice,
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/ErrorRecoveryFlows/RunPausedSplash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import {
} from '@opentrons/components'

import { getIsOnDevice } from '../../redux/config'
import { getErrorKind, useErrorMessage, useErrorName } from './hooks'
import { getErrorKind, useErrorMessage, useErrorName } from './utils'
import { LargeButton } from '../../atoms/buttons'
import { RECOVERY_MAP } from './constants'

import type { FailedCommand } from './types'
import type { UseRouteUpdateActionsResult } from './hooks'
import type { UseRouteUpdateActionsResult } from './utils'

export function useRunPausedSplash(): boolean {
return useSelector(getIsOnDevice)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import { renderWithProviders } from '../../../__testing-utils__'
import { i18n } from '../../../i18n'
import { mockFailedCommand } from '../__fixtures__'
import { ErrorRecoveryFlows, useErrorRecoveryFlows } from '..'
import { useCurrentlyRecoveringFrom, useERUtils } from '../hooks'
import { useCurrentlyRecoveringFrom, useERUtils } from '../utils'
import { useFeatureFlag } from '../../../redux/config'
import { useERWizard, ErrorRecoveryWizard } from '../ErrorRecoveryWizard'
import { useRunPausedSplash, RunPausedSplash } from '../RunPausedSplash'

import type { RunStatus } from '@opentrons/api-client'

vi.mock('../ErrorRecoveryWizard')
vi.mock('../hooks')
vi.mock('../utils')
vi.mock('../useRecoveryCommands')
vi.mock('../../../redux/config')
vi.mock('../RunPausedSplash')
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/ErrorRecoveryFlows/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { OT2_ROBOT_TYPE } from '@opentrons/shared-data'
import { useFeatureFlag } from '../../redux/config'
import { ErrorRecoveryWizard, useERWizard } from './ErrorRecoveryWizard'
import { RunPausedSplash, useRunPausedSplash } from './RunPausedSplash'
import { useCurrentlyRecoveringFrom, useERUtils } from './hooks'
import { useCurrentlyRecoveringFrom, useERUtils } from './utils'

import type { RunStatus } from '@opentrons/api-client'
import type { CompletedProtocolAnalysis } from '@opentrons/shared-data'
Expand Down

0 comments on commit 46cb0e4

Please sign in to comment.