Files
CBS-Mobile-App/src/modules/insurance/store/insuranceThunk.ts
T

14 lines
396 B
TypeScript

import { createAsyncThunk } from '@reduxjs/toolkit';
import { sleep } from '../../../utils/async';
import type { InsurancePlan } from '../types';
import { seedInsurancePlanCatalog } from '../services/insuranceApi';
export const seedInsurancePlans = createAsyncThunk<InsurancePlan[]>(
'insurance/seedPlans',
async () => {
await sleep(140);
return seedInsurancePlanCatalog();
},
);