Skip to content

Commit

Permalink
TEMP - update BrowseHelper (to be squashed)
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-kirwan committed Nov 13, 2023
1 parent 80f2158 commit 6eeceb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/helpers/browse_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module BrowseHelper
SLUGS = %w[benefits business].freeze
ACTION_LINK_SLUGS = %w[benefits business].freeze

def is_matching_slug?(slug)
SLUGS.include?(slug)
def display_action_links_for_slug?(slug)
ACTION_LINK_SLUGS.include?(slug)
end
end
4 changes: 2 additions & 2 deletions app/views/browse/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
} %>
<% end %>

<%= render "shared/browse_header", { margin_bottom: is_matching_slug?(page.slug) ? 7 : 9 } do %>
<%= render "shared/browse_header", { margin_bottom: display_action_links_for_slug?(page.slug) ? 7 : 9 } do %>
<h1 class="browse__heading govuk-heading-xl">
<%= page.title %>
</h1>
Expand All @@ -31,7 +31,7 @@
} %>
<% end %>

<% if is_matching_slug?(page.slug) %>
<% if display_action_links_for_slug?(page.slug) %>
<div class="govuk-width-container">
<div class="govuk-grid-row">
<% if page.slug == "benefits" %>
Expand Down

0 comments on commit 6eeceb6

Please sign in to comment.