We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2eb4d0 commit a83abb3Copy full SHA for a83abb3
packages/commerce-sdk-react/src/components/StorefrontPreview/storefront-preview.tsx
@@ -76,6 +76,13 @@ export const StorefrontPreview = ({
76
77
useEffect(() => {
78
if (enabled && isHostTrusted) {
79
+ if (process.env.NODE_ENV !== 'production' && !getBasePath) {
80
+ console.warn(
81
+ '[StorefrontPreview] No getBasePath prop provided. ' +
82
+ 'If your app uses a base path for router routes (showBasePath is true in url config), ' +
83
+ 'pass getBasePath to avoid base path duplication during navigation.'
84
+ )
85
+ }
86
window.STOREFRONT_PREVIEW = {
87
...window.STOREFRONT_PREVIEW,
88
getToken,
0 commit comments