woocommerce/plugins/woocommerce-admin/client/marketing
Eason d57b9e1d05
Make the `useCampaigns` hook support being used with multiple instances (#41211)
* Add tests for the `useCampaigns` hook in the woocommerce-admin marketing.

* Add `channels` to the deps of `useSelect` in the `useCampaigns` hook to avoid outdated hook states.

* Make the `useCampaigns` hook support being used with multiple instances.

- Include the `perPage` in the page key of campaigns in the multichannel's data store.
- Move the processing of querying the campaigns paging to the selector of the multichannel's data store.
- Move `total` in each campaign's paging of the multichannel's data store.
- Remove unused properties and their types: `state.campaigns.perPage` and `state.campaigns.total`

* Add changelog

* Multichannel data store - Move the `total` from `campaigns.pages[*]` to `campaigns.meta` to have only one total value.

Related to:
- https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1409634640
- https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1409590559

* Multichannel data store - Return the pagination meta of campaigns along with the `getCampaigns` selector.

Address: https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1412266127
2023-12-05 11:20:05 +08:00
..
components Remove Codisto from test. 2023-11-16 16:22:33 +08:00
coupons Fix the slides overlapping on the Marketing > Coupon page (#41155) 2023-11-14 10:23:08 +08:00
data fix: fixed all instances of no-use-before-define lint rule violations 2023-11-16 19:21:30 +08:00
data-multichannel Make the `useCampaigns` hook support being used with multiple instances (#41211) 2023-12-05 11:20:05 +08:00
hooks Make the `useCampaigns` hook support being used with multiple instances (#41211) 2023-12-05 11:20:05 +08:00
overview-multichannel update references to woocommerce.com to now reference woo.com 2023-11-10 15:49:08 +01:00
types Merge branch 'feature/34905-marketing-campaigns-card' into feature/34909-marketing-create-campaign-modal 2023-02-27 23:46:30 +08:00
README.md Marketing Tab MVP (https://github.com/woocommerce/woocommerce-admin/pull/3953) 2020-03-28 06:48:27 -07:00

README.md

Marketing

This folder contains the components used in the Marketing page.