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

14 lines
383 B
TypeScript
Raw Normal View History

2020-08-27 18:56:48 +03:00
import { Action } from 'redux';
import { CreateVisit } from '../types';
export const CREATE_VISITS = 'shlink/visitCreation/CREATE_VISITS';
2020-08-27 18:56:48 +03:00
export interface CreateVisitsAction extends Action<typeof CREATE_VISITS> {
createdVisits: CreateVisit[];
}
2020-08-27 18:56:48 +03:00
export const createNewVisits = (createdVisits: CreateVisit[]): CreateVisitsAction => ({
type: CREATE_VISITS,
createdVisits,
2020-08-27 18:56:48 +03:00
});