Use window.location.pathname instead of the router path. todo