fix: wrap button click handling in try-catch for improved error handling
This commit is contained in:
@@ -31,10 +31,14 @@ export function InviteUserButton() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
if (shouldShowUpgrade) {
|
try {
|
||||||
performUpgradeClick('top_bar_right', 'upgrade-user-top-bar');
|
if (shouldShowUpgrade) {
|
||||||
} else {
|
performUpgradeClick('top_bar_right', 'upgrade-user-top-bar');
|
||||||
performInviteUserClick('top_bar_right', 'invite-user-top-bar');
|
} else {
|
||||||
|
performInviteUserClick('top_bar_right', 'invite-user-top-bar');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to handle button click:', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user