2022-11-05 15:05:44 +03:00
|
|
|
import { createAction, PayloadAction } from '@reduxjs/toolkit';
|
2020-08-27 18:56:48 +03:00
|
|
|
import { CreateVisit } from '../types';
|
|
|
|
|
2022-11-08 00:29:15 +03:00
|
|
|
const CREATE_VISITS = 'shlink/visitCreation/CREATE_VISITS';
|
2020-08-27 18:56:48 +03:00
|
|
|
|
2022-11-05 15:01:00 +03:00
|
|
|
export type CreateVisitsAction = PayloadAction<{
|
2020-09-12 12:31:44 +03:00
|
|
|
createdVisits: CreateVisit[];
|
2022-11-05 15:01:00 +03:00
|
|
|
}>;
|
2020-08-27 18:56:48 +03:00
|
|
|
|
2022-11-05 15:05:44 +03:00
|
|
|
export const createNewVisits = createAction(
|
|
|
|
CREATE_VISITS,
|
|
|
|
(createdVisits: CreateVisit[]) => ({ payload: { createdVisits } }),
|
|
|
|
);
|