@burdenoff/website-sdk 2026.513.2 → 2026.513.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/pricing.js +9 -8
- package/dist/components/pricing.js.map +1 -1
- package/dist/components/pricing.mjs +9 -8
- package/dist/components/pricing.mjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1385,9 +1385,9 @@ function NewsletterForm({
|
|
|
1385
1385
|
)
|
|
1386
1386
|
] });
|
|
1387
1387
|
}
|
|
1388
|
-
var
|
|
1389
|
-
query
|
|
1390
|
-
|
|
1388
|
+
var GET_PLANS_QUERY = `
|
|
1389
|
+
query GetPublicPlans($productId: ID!) {
|
|
1390
|
+
publicPlans(productId: $productId) {
|
|
1391
1391
|
id
|
|
1392
1392
|
name
|
|
1393
1393
|
price
|
|
@@ -1563,17 +1563,18 @@ function PricingSection(props) {
|
|
|
1563
1563
|
async function loadPlans() {
|
|
1564
1564
|
try {
|
|
1565
1565
|
setLoading(true);
|
|
1566
|
-
const response = await client.query(
|
|
1566
|
+
const response = await client.query(
|
|
1567
|
+
GET_PLANS_QUERY,
|
|
1568
|
+
{ productId: resolvedProductId }
|
|
1569
|
+
);
|
|
1567
1570
|
if (cancelled) return;
|
|
1568
1571
|
if (response.errors && response.errors.length > 0) {
|
|
1569
1572
|
throw new Error(response.errors[0].message);
|
|
1570
1573
|
}
|
|
1571
|
-
if (!response.data?.
|
|
1574
|
+
if (!response.data?.publicPlans) {
|
|
1572
1575
|
throw new Error("No plans data received");
|
|
1573
1576
|
}
|
|
1574
|
-
const cards = response.data.
|
|
1575
|
-
(plan) => plan.isActive && (!resolvedProductId || plan.productID === resolvedProductId)
|
|
1576
|
-
).map((plan) => transformToDisplayCard(plan, props)).sort((a, b) => a.priceRaw - b.priceRaw);
|
|
1577
|
+
const cards = response.data.publicPlans.filter((plan) => plan.isActive).map((plan) => transformToDisplayCard(plan, props)).sort((a, b) => a.priceRaw - b.priceRaw);
|
|
1577
1578
|
setAllPlans(cards);
|
|
1578
1579
|
setError(null);
|
|
1579
1580
|
} catch (err) {
|