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 // #ownProps
children, children,
customerId, customerId,
className,
// #withDrawerActions // #withDrawerActions
openDrawer, openDrawer,
}) { }) {
// Handle view customer drawer. // Handle view customer drawer.
const handleCustomerDrawer = () => { const handleCustomerDrawer = (event) => {
openDrawer('customer-details-drawer', { customerId }); 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)( export const CustomerDrawerLink = R.compose(withDrawerActions)(