index.js 282 B

1234567891011
  1. import {clockState,clockJournalState} from './config';
  2. export const getClockState = (id,journal = false) => {
  3. let arr = journal ? clockJournalState.filter(v=>v.id === id) : clockState.filter(v=>v.id === id);
  4. if(arr.length > 0){
  5. return arr[0];
  6. }else{
  7. return {};
  8. }
  9. }