Moved category switching logic from Navigation.js to Category..js