mirror of
https://github.com/vercel/commerce.git
synced 2025-05-08 18:57:51 +00:00
refactor(OpenCart): enhance readability by cleaning up conditional rendering
This commit is contained in:
parent
694c5c17ba
commit
7c170bdbb4
@ -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>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user