2023-02-18 12:40:37 +03:00
|
|
|
import type { PayloadAction } from '@reduxjs/toolkit';
|
|
|
|
import { createAction } from '@reduxjs/toolkit';
|
|
|
|
import type { CreateVisit } from '../types';
|
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(
|
2022-11-11 00:44:25 +03:00
|
|
|
'shlink/visitCreation/createNewVisits',
|
2022-11-05 15:05:44 +03:00
|
|
|
(createdVisits: CreateVisit[]) => ({ payload: { createdVisits } }),
|
|
|
|
);
|