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

12 lines
352 B
TypeScript

import { Action } from 'redux';
import { CreateVisit } from '../types';
export const CREATE_VISIT = 'shlink/visitCreation/CREATE_VISIT';
export type CreateVisitAction = Action<typeof CREATE_VISIT> & CreateVisit;
export const createNewVisit = ({ shortUrl, visit }: CreateVisit): CreateVisitAction => ({
type: CREATE_VISIT,
shortUrl,
visit,
});