@burdenoff/website-sdk 2026.516.11 → 2026.516.13
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/content/index.js +16 -2
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs +16 -2
- package/dist/content/index.mjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2767,10 +2767,13 @@ var PUBLIC_CONTENT_PAGES_QUERY = `
|
|
|
2767
2767
|
function useContentPage(slug, options) {
|
|
2768
2768
|
const client = useWebSDK();
|
|
2769
2769
|
const config = useWebSDKConfig();
|
|
2770
|
+
const { product } = useProduct();
|
|
2771
|
+
const resolvedProductId = product?.id || config.productId;
|
|
2770
2772
|
const [data, setData] = useState(null);
|
|
2771
2773
|
const [loading, setLoading] = useState(true);
|
|
2772
2774
|
const [error, setError] = useState(null);
|
|
2773
2775
|
const fetchPage = useCallback(async () => {
|
|
2776
|
+
if (!resolvedProductId) return;
|
|
2774
2777
|
setLoading(true);
|
|
2775
2778
|
setError(null);
|
|
2776
2779
|
try {
|
|
@@ -2780,7 +2783,7 @@ function useContentPage(slug, options) {
|
|
|
2780
2783
|
query,
|
|
2781
2784
|
{
|
|
2782
2785
|
slug,
|
|
2783
|
-
productId:
|
|
2786
|
+
productId: resolvedProductId
|
|
2784
2787
|
}
|
|
2785
2788
|
);
|
|
2786
2789
|
if (result.errors?.length) {
|
|
@@ -2795,7 +2798,7 @@ function useContentPage(slug, options) {
|
|
|
2795
2798
|
} finally {
|
|
2796
2799
|
setLoading(false);
|
|
2797
2800
|
}
|
|
2798
|
-
}, [client,
|
|
2801
|
+
}, [client, resolvedProductId, slug, options?.resolve]);
|
|
2799
2802
|
useEffect(() => {
|
|
2800
2803
|
fetchPage();
|
|
2801
2804
|
}, [fetchPage]);
|