Compare commits

..

1 Commits

Author SHA1 Message Date
review-agent-prime[bot]
30d6161caa Edit packages/database/migrations/20240229062232_adds_styling_column_to_product_model/data-migration.ts 2024-03-04 16:40:23 +00:00
2 changed files with 17 additions and 17 deletions

View File

@@ -41,20 +41,20 @@ export default function Modal({
}
let placementClass = "";
switch (placement) {
case "bottomLeft":
placementClass = "bottom left";
break;
case "bottomRight":
placementClass = "bottom right";
break;
case "topLeft":
placementClass = "top left";
break;
case "topRight":
placementClass = "top right";
break;
}
if (placement === "bottomLeft") {
placementClass = "bottom left";
} else if (placement === "bottomRight") {
placementClass = "bottom right";
} else if (placement === "topLeft") {
placementClass = "top left";
} else if (placement === "topRight") {
placementClass = "top right";
}
return {
transform: `scale(${scaleValue})`,
transformOrigin: placementClass,
};
};

View File

@@ -10,9 +10,9 @@ async function main() {
// styling object needs to be created for each product
const products = await tx.product.findMany({});
if (!products) {
// something went wrong, could not find any products
return;
if (!products || products.length === 0) {
throw new Error('No products found');
}
}
if (products.length) {