graasp / graasp-player

GNU Affero General Public License v3.0
0 stars 2 forks source link

fix: internal link crashes navigation #774

Closed spaenleh closed 3 months ago

spaenleh commented 3 months ago

ref #773

How to reproduce:

  1. Create a lesson with a link item that points to a player url with only the first segment (rootId) such as: https://player.graasp.org/12345
  2. When you click the link the tree navigation on the left crashes and displays the hello text which is not good.

How to fix:

I added a button that is shown when the navigation crashes (via the error boundary), it reloads the full page allowing the navigation tree to be displayed.

Better solution would be to detect urls that point to internal content and adapt how we navigate to them.

Steps

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud