mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-09 17:57:26 +03:00
Migrated createNewVisits action creator to RTK
This commit is contained in:
parent
d588d8d9ef
commit
7c61033bdf
1 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { PayloadAction } from '@reduxjs/toolkit';
|
import { createAction, PayloadAction } from '@reduxjs/toolkit';
|
||||||
import { CreateVisit } from '../types';
|
import { CreateVisit } from '../types';
|
||||||
|
|
||||||
export const CREATE_VISITS = 'shlink/visitCreation/CREATE_VISITS';
|
export const CREATE_VISITS = 'shlink/visitCreation/CREATE_VISITS';
|
||||||
|
@ -7,7 +7,7 @@ export type CreateVisitsAction = PayloadAction<{
|
||||||
createdVisits: CreateVisit[];
|
createdVisits: CreateVisit[];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
export const createNewVisits = (createdVisits: CreateVisit[]): CreateVisitsAction => ({
|
export const createNewVisits = createAction(
|
||||||
type: CREATE_VISITS,
|
CREATE_VISITS,
|
||||||
payload: { createdVisits },
|
(createdVisits: CreateVisit[]) => ({ payload: { createdVisits } }),
|
||||||
});
|
);
|
||||||
|
|
Loading…
Reference in a new issue