shlink-web-client/src/visits/reducers/visitCreation.ts

12 lines
351 B
TypeScript
Raw Normal View History

import { createAction, PayloadAction } from '@reduxjs/toolkit';
2020-08-27 18:56:48 +03:00
import { CreateVisit } from '../types';
export type CreateVisitsAction = PayloadAction<{
createdVisits: CreateVisit[];
}>;
2020-08-27 18:56:48 +03:00
export const createNewVisits = createAction(
'shlink/visitCreation/createNewVisits',
(createdVisits: CreateVisit[]) => ({ payload: { createdVisits } }),
);