import type { State } from '../../types' ; import { SESSION_TYPE_DECK_CALIBRATION } from '../constants' ; import type { Session , DeckCalibrationSession } from '../types' ; import { getRobotSessionOfType } from '../selectors' ; export const getDeckCalibrationSession = ( state , robotName ) => { const deckSession = getRobotSessionOfType ( state , robotName , SESSION_TYPE_DECK_CALIBRATION ) ; if ( deckSession && deckSession . sessionType === SESSION_TYPE_DECK_CALIBRATION ) { return deckSession ; } return null ; } ;