@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 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 || publicUrl === "/" ? "" : `?fb_url=${encodeURIComponent(publicUrl)}&fb_version=${buildVersion}`, [publicUrl, buildVersion]);
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 || publicUrl === "/" ? "" : `?fb_url=${encodeURIComponent(publicUrl)}&fb_version=${buildVersion}`, [publicUrl, buildVersion]);
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-hooks",
3
- "version": "0.2.216",
3
+ "version": "0.2.218",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {