This repository was archived by the owner on May 25, 2021. It is now read-only.

Description
Describe the bug
when the page loads and the user is not logged in, the page loads to /welcome and gives an error message 'Something went wrong', and throws an error: Uncaught Invariant Violation: You should not use outside a
To Reproduce
Steps to reproduce the behavior:
- npm install react-router-dom@5.1.2
- npm start
- See error
Expected behavior
/welcome should redirect to /login and show the login page
Desktop (please complete the following information):
- OS: Windows 10
- Browser Chrome
- Version 79.0.3945.130 (Official Build) (64-bit)
Additional context
After some investigation i've narrowed it down to Private Layout loosing the context of the Router but I can't find futher avenues of investigation because the error occurse in the validation code of react-router. this is the callstack:
in jl (created by t)
in t (created by WithWebId(t))
in WithWebId(t) (at routes.js:87)
in Switch (at routes.js:81)
line 87 is the Private Layout component