mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-28 09:20:49 -06:00
Compare commits
1 Commits
ReviewBot/
...
ReviewBot/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30d6161caa |
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user