commercelayer / dashboard-apps

Commerce Layer's Dashboard applications.
https://dashboard.commercelayer.io
MIT License
0 stars 3 forks source link

SKUs and SKU Lists break navigation #154

Open maxmezzomo opened 19 hours ago

maxmezzomo commented 19 hours ago

Describe the bug

on /apps clicking either 'SKUsorSKU Lists` seem to break navigation, specifically back button navigation. Additionally both seem to add 2 entries to history which may be the issue.

On a related note, is there a motivation for rending buttons over anchor links which would be in my opinion a more pleasant user experience.

To Reproduce

  1. On dashboard app home /apps
  2. No particular config
  3. Click on SKUs or SKU Lists button
  4. On /skus/list try to navigate back in browser
  5. If bug should stay on /skus/list

System

No response

Additional context

If useful, did some digging, and I think the following redirect causes the issues

https://github.com/commercelayer/dashboard-apps/blob/cc921cfd226a012f6655113937c83c367cb0b220/apps/sku_lists/src/App.tsx#L22

perhaps the location should be replaced so you avoid getting caught in infinite redirect loop if trying to go back in history.