Gan Eng Chin
b83888577a
Fix getTotalFromResponse treating total 0 as undefined.
...
If total is 0, then the function should return 0, not undefined.
2023-03-02 01:13:42 +08:00
Gan Eng Chin
f7a1ef2123
Code refactor with getTotalFromResponse in getCampaigns.
2023-02-24 23:45:10 +08:00
Gan Eng Chin
a982b7be21
Error handling in getCampaigns.
2023-02-24 18:32:33 +08:00
Gan Eng Chin
60d815c582
wp.data for campaigns data pagination.
2023-02-24 02:10:37 +08:00
Gan Eng Chin
743c0e5085
Set per_page to 100 for getCampaigns.
...
100 is the maximum limit allowed by the API.
We do this because the API does not return total number of rows, so we use 100 to get "all" rows, to support pagination in the UI.
2023-02-02 01:03:15 +08:00
Gan Eng Chin
cd7b5f2c96
Fetch and display campaigns with wp.data.
2023-02-01 19:02:03 +08:00
Gan Eng Chin
f050bb79b5
Rename Channel to RegisteredChannel.
...
This is for better clarity and consistency.
2023-02-01 00:52:35 +08:00
Gan Eng Chin
0b1ab21836
Rename types.
2023-01-21 02:14:36 +08:00
Gan Eng Chin
b708cc18ff
Get recommended channels from API.
2023-01-19 19:33:51 +08:00
Gan Eng Chin
f616d688d8
Call marketing channels API with wp.data.
2023-01-18 02:04:42 +08:00