Move top links partial to a component

This way it's easier to test.
This commit is contained in:
Javi Martín
2021-05-06 20:19:03 +02:00
parent f26a06de83
commit 6d999559b3
3 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
<ul class="no-bullet external-links">
<%= raw content_block("top_links", I18n.locale) %>
</ul>

View File

@@ -0,0 +1,3 @@
class Layout::TopLinksComponent < ApplicationComponent
delegate :content_block, to: :helpers
end

View File

@@ -1,3 +1 @@
<ul class="no-bullet external-links">
<%= raw content_block("top_links", I18n.locale) %>
</ul>
<%= render Layout::TopLinksComponent.new %>