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

13 lines
352 B
TypeScript
Raw Normal View History

2020-08-27 18:56:48 +03:00
import { Action } from 'redux';
import { CreateVisit } from '../types';
export const CREATE_VISIT = 'shlink/visitCreation/CREATE_VISIT';
export type CreateVisitAction = Action<typeof CREATE_VISIT> & CreateVisit;
2020-08-27 18:56:48 +03:00
export const createNewVisit = ({ shortUrl, visit }: CreateVisit): CreateVisitAction => ({
type: CREATE_VISIT,
shortUrl,
visit,
});