Skip to content

Commit

Permalink
better use effects
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Jul 31, 2024
1 parent ab12375 commit ea1a927
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function useFailedLabwareUtils({
}: UseFailedLabwareUtilsProps): UseFailedLabwareUtilsResult {
const recentRelevantFailedLabwareCmd = React.useMemo(
() => getRelevantFailedLabwareCmdFrom({ failedCommand, runCommands }),
[failedCommand?.key, runCommands]
[failedCommand?.error?.errorType, runCommands]
)

const tipSelectionUtils = useTipSelectionUtils(recentRelevantFailedLabwareCmd)
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 @@ -121,7 +121,7 @@ export function ErrorRecoveryFlows(
const analytics = useRecoveryAnalytics()
React.useEffect(() => {
analytics.reportErrorEvent(failedCommand)
}, [failedCommand?.key])
}, [failedCommand?.error?.detail])

const { hasLaunchedRecovery, toggleERWizard, showERWizard } = useERWizard()
const isOnDevice = useSelector(getIsOnDevice)
Expand Down

0 comments on commit ea1a927

Please sign in to comment.