refactor(OpenCart): enhance readability by cleaning up conditional rendering

This commit is contained in:
stepan 2024-10-05 18:21:30 +02:00
parent 694c5c17ba
commit 7c170bdbb4

View File

@ -14,11 +14,11 @@ export default function OpenCart({
className={clsx('h-4 transition-all ease-in-out hover:scale-110', className)}
/>
{quantity ? (
{quantity &&
<div className="absolute right-0 top-0 -mr-2 -mt-2 h-4 w-4 rounded bg-blue-600 text-[11px] font-medium text-white">
{quantity}
</div>
) : null}
}
</div>
);
}