PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 All 106 releases
wp-parsely / src / blocks / recommendations / actions.ts

actions.ts in Parse.ly 3.24.2, at src/blocks/recommendations/actions.ts

25 lines 587 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { RecommendationsAction } from './constants';
2 import { Recommendation } from './models/Recommendation';
3
4 interface SetErrorPayload {
5 error: string;
6 }
7
8 interface SetRecommendationsPayload {
9 recommendations: Recommendation[];
10 }
11
12 export const setError = ( { error }: SetErrorPayload ) => ( {
13 type: RecommendationsAction.Error,
14 error,
15 } );
16
17 export const setRecommendations = ( { recommendations }: SetRecommendationsPayload ) => ( {
18 type: RecommendationsAction.Recommendations,
19 recommendations,
20 } );
21
22 export const setLoaded = () => ( {
23 type: RecommendationsAction.Loaded,
24 } );
25