Skip to content

make GlobalNavbar a React.FunctionComponent

Administrator requested to merge globalnavbar-react-func-component into main

Created by: sqs

The diff in the snapshot is because the authRequired value from the Observable is undefined when the component is rendered by the test renderer. Previously, when the subscription was manually set up, it was true because there is no global authenticatedUser when the test runs.

It's actually more helpful for the test snapshot to render the authRequired=undefined|false case because more things are rendered then. It would be ideal to test both cases, but to do so cleanly would require refactoring out the global authRequired to be passed down through props.

Merge request reports

Loading