Summary:
I've noticed a warning during Flipper build that the antd patch was created for an earlier version of antd, so I did what was suggested in the warning message to get rid of this warning:
```
Warning: patch-package detected a patch file version mismatch
Don't worry! This is probably fine. The patch was still applied
successfully. Here's the deets:
Patch file created for
antd@4.11.2
applied to
antd@4.12.2
At path
node_modules/antd
This warning is just to give you a heads-up. There is a small chance of
breakage even though the patch was applied successfully. Make sure the package
still behaves like you expect (you wrote tests, right?) and then run
patch-package antd
to update the version in the patch file name and make this warning go away.
```
Reviewed By: fabiomassimo
Differential Revision: D26724100
fbshipit-source-id: 2f548c92f61e5d300d772913baf8b8e4f8fb87ef
27 lines
820 B
Diff
27 lines
820 B
Diff
diff --git a/node_modules/antd/es/button/button.js b/node_modules/antd/es/button/button.js
|
|
index 7b9490c..99067b6 100644
|
|
--- a/node_modules/antd/es/button/button.js
|
|
+++ b/node_modules/antd/es/button/button.js
|
|
@@ -189,6 +189,8 @@ var InternalButton = function InternalButton(props, ref) {
|
|
}, [loadingOrDelay]);
|
|
React.useEffect(fixTwoCNChar, [buttonRef]);
|
|
|
|
+ var scope = React.useContext(global.FlipperTrackingScopeContext);
|
|
+
|
|
var handleClick = function handleClick(e) {
|
|
var onClick = props.onClick;
|
|
|
|
@@ -197,7 +199,11 @@ var InternalButton = function InternalButton(props, ref) {
|
|
}
|
|
|
|
if (onClick) {
|
|
- onClick(e);
|
|
+ global.flipperTrackInteraction(
|
|
+ 'Button', 'onClick', scope, props.title || props.children || props.icon,
|
|
+ onClick,
|
|
+ e
|
|
+ );
|
|
}
|
|
};
|
|
|