feat: update button visibility logic to check variant length in ProductCreate and ProductEdit components

This commit is contained in:
Yoga Pangestu 2026-08-16 15:20:38 +07:00
parent 8ea9378c78
commit b0cb117e60
2 changed files with 4 additions and 4 deletions

View File

@ -608,8 +608,8 @@ export default function ProductCreate({ categories }: Props) {
</Button>
</>
)}
{variantIndex >
0 && (
{variants.length >
1 && (
<Button
type="button"
variant="outline"

View File

@ -665,8 +665,8 @@ export default function ProductEdit({ product, categories }: Props) {
</Button>
</>
)}
{variantIndex >
0 && (
{variants.length >
1 && (
<Button
type="button"
variant="outline"