Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
martyn-w committed Apr 26, 2024
1 parent 96c997c commit 2f4d65c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/header/navigation_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def sync_mode(mode)
mode == :mobile ? :desktop : :mobile
end

def nav_link(resource, mode, level: 1)
def nav_link(resource, mode)
title = resource.title
path = resource.path
li_id = "#{path.parameterize}-#{mode}"
Expand Down Expand Up @@ -57,7 +57,7 @@ def category_list(resource, mode, css_class:)
safe_join(
[
resource.children_without_subcategory.map do |child_resource|
nav_link(child_resource, mode, level: 2)
nav_link(child_resource, mode)
end,
resource.subcategories.map do |category|
category_link(category, resource, mode)
Expand Down Expand Up @@ -103,7 +103,7 @@ def page_list(resource, subcategory, mode, css_class:)
safe_join(
[
resource.children_in_subcategory(subcategory).map do |child_resource|
nav_link(child_resource, mode, level: 3)
nav_link(child_resource, mode)
end,
],
)
Expand Down

0 comments on commit 2f4d65c

Please sign in to comment.