@trackunit/react-core-hooks 0.2.216 → 0.2.218
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/index.cjs.js +2 -2
- package/index.esm.js +2 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -298,8 +298,8 @@ const useImageUploader = () => {
|
|
|
298
298
|
* Returns the query string to be appended to the URL when the app is served from a Feature Branch.
|
|
299
299
|
*/
|
|
300
300
|
const useFeatureBranchQueryString = () => {
|
|
301
|
-
const { publicUrl, buildVersion } = useEnvironment();
|
|
302
|
-
const featureBranchQueryParam = React.useMemo(() => !publicUrl ||
|
|
301
|
+
const { publicUrl, buildVersion, isFeatureBranch } = useEnvironment();
|
|
302
|
+
const featureBranchQueryParam = React.useMemo(() => (!publicUrl || !isFeatureBranch ? "" : `?fb_url=${encodeURIComponent(publicUrl)}&fb_version=${buildVersion}`), [publicUrl, buildVersion, isFeatureBranch]);
|
|
303
303
|
return { featureBranchQueryParam };
|
|
304
304
|
};
|
|
305
305
|
|
package/index.esm.js
CHANGED
|
@@ -275,8 +275,8 @@ const useImageUploader = () => {
|
|
|
275
275
|
* Returns the query string to be appended to the URL when the app is served from a Feature Branch.
|
|
276
276
|
*/
|
|
277
277
|
const useFeatureBranchQueryString = () => {
|
|
278
|
-
const { publicUrl, buildVersion } = useEnvironment();
|
|
279
|
-
const featureBranchQueryParam = useMemo(() => !publicUrl ||
|
|
278
|
+
const { publicUrl, buildVersion, isFeatureBranch } = useEnvironment();
|
|
279
|
+
const featureBranchQueryParam = useMemo(() => (!publicUrl || !isFeatureBranch ? "" : `?fb_url=${encodeURIComponent(publicUrl)}&fb_version=${buildVersion}`), [publicUrl, buildVersion, isFeatureBranch]);
|
|
280
280
|
return { featureBranchQueryParam };
|
|
281
281
|
};
|
|
282
282
|
|