selectors.ts 388 B

12345678910111213
  1. import { EnterpriseStoreState, Report, ReportsState } from '../../types';
  2. export const getReport = (state: ReportsState, currentReportId: any): Report | null => {
  3. if (state.report.id === parseInt(currentReportId, 10)) {
  4. return state.report;
  5. }
  6. return null;
  7. };
  8. export const getLastUid = (state: EnterpriseStoreState): string | undefined => {
  9. return state.reports.lastUid;
  10. };