Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Clean up view files for main nav.

Matthew Kennedy68878a77088f
diff --git a/frontend/app/views/spree/shared/_main_nav_bar.html.erb b/frontend/app/views/spree/shared/_main_nav_bar.html.erb
index 14201f6832..067640b54b 100644
--- a/frontend/app/views/spree/shared/_main_nav_bar.html.erb
+++ b/frontend/app/views/spree/shared/_main_nav_bar.html.erb
@@ -1,10 +1,10 @@
-<% if spree_menu('header').present? %>
+<% if spree_menu.present? %>
<% category = 'category' %>
<% promo = 'promo' %>
<div class="h-100" role="navigation" aria-label="<%= Spree.t('nav_bar.desktop') %>">
<ul class="nav h-100 main-nav-bar">
- <% spree_menu('header').children.each do |parent| %>
+ <% spree_menu.children.each do |parent| %>
<li class="p-0 nav-item main-nav-bar-category">
<% has_dropdown = parent.children.present? %>
<% dropdown_toggle_class = has_dropdown ? "dropdown-toggle" : "" %>
diff --git a/frontend/app/views/spree/shared/_mobile_navigation.html.erb b/frontend/app/views/spree/shared/_mobile_navigation.html.erb
index 271b062aaa..ae7facb43c 100644
--- a/frontend/app/views/spree/shared/_mobile_navigation.html.erb
+++ b/frontend/app/views/spree/shared/_mobile_navigation.html.erb
@@ -1,4 +1,4 @@
-<% if spree_menu('header').present? %>
+<% if spree_menu.present? %>
<div class="position-fixed text-uppercase d-xl-none mobile-navigation" role="navigation" aria-label="<%= Spree.t('nav_bar.mobile') %>">
<div class="container d-flex align-items-center justify-content-between header-spree" data-hook>
<button class="m-0 p-0" id="mobile-navigation-back-button" aria-label="<%= Spree.t('nav_bar.go_to_previous_menu') %>">
@@ -18,7 +18,7 @@
</div>
<ul class="list-unstyled position-relative h-100 mobile-navigation-list">
- <% spree_menu('header').children.each do |parent| %>
+ <% spree_menu.children.each do |parent| %>
<li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
<%= link_to parent.name, spree_localized_item_link(parent), class: 'w-75' %>
<% if parent.children.present? %>