shlink-web-client/shlink-web-component/visits/reducers/visitCreation.ts
2023-08-03 09:13:10 +02:00

12 lines
396 B
TypeScript

import type { PayloadAction } from '@reduxjs/toolkit';
import { createAction } from '@reduxjs/toolkit';
import type { CreateVisit } from '../types';
export type CreateVisitsAction = PayloadAction<{
createdVisits: CreateVisit[];
}>;
export const createNewVisits = createAction(
'shlink/visitCreation/createNewVisits',
(createdVisits: CreateVisit[]) => ({ payload: { createdVisits } }),
);