Skip to content

Navbar Bug Fix: adds the checklogin method back to the ngOnInit from Navbar

Maximilian Firla requested to merge navbarBugFix into develop

Problem:
Manually reloading the page, or navigating between pages using the URL, caused the navbar to switch the layout.

Reason:
When the page is reloaded or a URL is entered directly, the Angular application is reinitialized, and any runtime state held in memory (like the isLoggedIn boolean) is reset.

Fix:
Adds checkLogin() back to the ngOnInit of the Navbar (was removed while adding the behaviorSubject of isLoggedIn). CheckLogin will be performed on every Reload (as it was before) and updates the behaviorSubject accordingly.

Edited by Maximilian Firla

Merge request reports