import { Store } from '@/store/root' ; import { ScreenState } from './index' ; function _stateScope ( state ) { return state . containers . bookList ; } function isInitialized ( state ) { return _stateScope ( state ) . screenState !== ScreenState . INITIAL_FETCHING ; } function books ( state ) { return Object . values ( _stateScope ( state ) . books ) . sort ( ( a , b ) => a . updatedAt > b . updatedAt ? - 1 : 1 ) ; } export default { isInitialized , books , } ;