fix(CustomerDrawerLink): prevent the default JS behaivour.

This commit is contained in:
a.bouhuolia
2022-03-19 23:13:05 +02:00
parent 0e263437e1
commit 966d1100aa

View File

@@ -8,16 +8,22 @@ function CustomerDrawerLinkComponent({
// #ownProps
children,
customerId,
className,
// #withDrawerActions
openDrawer,
}) {
// Handle view customer drawer.
const handleCustomerDrawer = () => {
const handleCustomerDrawer = (event) => {
openDrawer('customer-details-drawer', { customerId });
event.preventDefault();
};
return <ButtonLink onClick={handleCustomerDrawer}>{children}</ButtonLink>;
return (
<ButtonLink className={className} onClick={handleCustomerDrawer}>
{children}
</ButtonLink>
);
}
export const CustomerDrawerLink = R.compose(withDrawerActions)(