const onClickPropertyType = () => {
let targetPath;
if (listingType === 'Sale') {
targetPath = '/buy';
} else if (listingType === 'Rent') {
targetPath = '/rent';
}
const parseQbject = JSON.parse(JSON.stringify({
state,
page: 1,
propertyType: PropertyTypeQuery,
}));
Router.push({
pathname: targetPath,
query: { ...parseQbject },
});
};
return (
<div>
<li className="breadcrumb-item"><a onClick={onClickPropertyType}>{PropertyType}</a></li>
</div>
);