Skip to content

Commit

Permalink
fix: pressing home button shouldn't open sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
sethidden committed Jun 20, 2022
1 parent e55e4c7 commit d45fa8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/theme/components/BottomNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default defineComponent({
const handleHomeClick = async () => {
const homePath = app.localeRoute({ name: 'home' });
await router.push(homePath);
if (isMobileMenuOpen) {
if (isMobileMenuOpen.value) {
toggleMobileMenu();
}
};
Expand Down
5 changes: 4 additions & 1 deletion packages/theme/test-utils/mocks/useUiState.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { computed } from '@nuxtjs/composition-api';

export const useUiStateMock = (extend = {}) => ({
isCartSidebarOpen: false,
isCartSidebarOpen: computed(() => false),
isMobileMenuOpen: computed(() => false),
changeToCategoryGridView: jest.fn(),
changeToCategoryListView: jest.fn(),
toggleCartSidebar: jest.fn(),
Expand Down

0 comments on commit d45fa8b

Please sign in to comment.