Gan Eng Chin
|
1b65be0a53
|
Fix useSelect dependency in useIntroductionBanner.
|
2023-03-19 20:50:37 +08:00 |
Gan Eng Chin
|
99c6ebff15
|
Remove the use of isOptionsUpdating in useIntroductionBanner.
isOptionsUpdating will return true for any option update, not just our option here. This causes issue as shown in demo video in https://github.com/woocommerce/woocommerce/pull/37110#discussion_r1130531104.
We can just depend on getOption. When we update an option, it will be updated immediately in wp.data store before making API request to update the option in database (see c5564a15c1/packages/js/data/src/options/actions.ts (L44) ).
|
2023-03-19 20:38:20 +08:00 |
Gan Eng Chin
|
162d790a7a
|
Update option name and value to make it more indicative.
|
2023-03-19 20:16:04 +08:00 |
Gan Eng Chin
|
49253425b2
|
Specify dependency for useSelect in useIntroductionBanner.
Co-authored-by: Eason <eason.su.tw@gmail.com>
|
2023-03-19 20:12:09 +08:00 |
Gan Eng Chin
|
35375c6fab
|
Rename UseIntroductionBannerType to UseIntroductionBanner.
|
2022-12-27 22:13:21 +08:00 |
Gan Eng Chin
|
e1a82c5b94
|
Display and dismiss introduction banner with wp_options.
|
2022-12-27 22:01:46 +08:00 |