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

13 lines
396 B
TypeScript
Raw Normal View History

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
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 } }),
);