Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return WrappedComponent => {
const displayName = getDisplayName(WrappedComponent);
return class extends React.Component {
static displayName = displayName;
static propTypes = {
api: PropTypes.object,
};
componentWillUnmount() {
this.finishProfile();
}
activity = TransactionActivity.pushActivity(displayName, {
data: {},
op: 'react',
description: `<${displayName}>`,
});
finishProfile = () => {
if (!this.activity) {
return;
}
TransactionActivity.popActivity(this.activity);
this.activity = null;
};
render() {
return ;