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.

Drop locale when linking to Admin Panel

Damian Legawiec401dbb703822
diff --git a/frontend/app/views/spree/shared/_link_to_account.html.erb b/frontend/app/views/spree/shared/_link_to_account.html.erb
index 07a49a2e67..90cf1d3972 100644
--- a/frontend/app/views/spree/shared/_link_to_account.html.erb
+++ b/frontend/app/views/spree/shared/_link_to_account.html.erb
@@ -1,6 +1,6 @@
<% if try_spree_current_user %>
<%= link_to Spree.t('nav_bar.my_account'), spree.account_path, class: 'dropdown-item' if spree.respond_to?(:account_path) %>
- <%= link_to Spree.t('nav_bar.admin_panel'), spree.admin_orders_path, class: 'dropdown-item text-uppercase' if try_spree_current_user.has_spree_role?(:admin) %>
+ <%= link_to Spree.t('nav_bar.admin_panel'), spree.admin_orders_path(locale: nil), class: 'dropdown-item text-uppercase' if try_spree_current_user.has_spree_role?(:admin) %>
<%= link_to Spree.t('nav_bar.log_out'), spree_logout_path, class: 'dropdown-item', method: :get if defined?(spree_logout_path) %>
<% else %>
<%= link_to Spree.t('nav_bar.log_in'), spree_login_path, class: 'dropdown-item' if defined?(spree_login_path) %>