l-min-components 1.7.1494 → 1.7.1496

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.7.1494",
3
+ "version": "1.7.1496",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -204,8 +204,30 @@ const AppMainLayout = ({ children }) => {
204
204
  if (!shouldSkipNavigation && defaultAccountType) {
205
205
  const urlContainsAccountType = currentUrl.includes(defaultAccountType);
206
206
 
207
+ console.log(
208
+ {
209
+ currentUrl,
210
+ defaultAccountType,
211
+ urlContainsAccountType,
212
+ shouldSkipNavigation,
213
+ hostname: window.location.hostname,
214
+ },
215
+ "Navigation Debug"
216
+ );
217
+
207
218
  if (!urlContainsAccountType) {
208
- window.location.href = `/${defaultAccountType}`;
219
+ // Use setTimeout to ensure navigation happens after React Router is ready
220
+ setTimeout(() => {
221
+ const targetUrl = `/${defaultAccountType}`;
222
+ console.log(`Navigating to: ${targetUrl}`);
223
+
224
+ // Try using window.location.replace for staging compatibility
225
+ if (window.location.hostname.includes("staging")) {
226
+ window.location.replace(targetUrl);
227
+ } else {
228
+ window.location.href = targetUrl;
229
+ }
230
+ }, 100);
209
231
  }
210
232
  }
211
233
  }