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

14 lines
390 B
TypeScript
Raw Normal View History

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