diff --git a/src/core/Meganav/component.html.erb b/src/core/Meganav/component.html.erb index 124c6e0ab..617dd8e64 100644 --- a/src/core/Meganav/component.html.erb +++ b/src/core/Meganav/component.html.erb @@ -2,7 +2,7 @@ <%= notice %>
- <%= render(AblyUi::Core::Logo.new(theme_name: @theme_name, data_id: "meganav-logo", href: url_base)) %> + <%= render(AblyUi::Core::Logo.new(theme_name: @theme_name, data_id: "meganav-logo", href: logo_link)) %> <%= render(AblyUi::Core::MeganavItemsDesktop.new(theme_name: @theme_name, url_base: url_base)) %> <% if @session_data[:signedIn] %> diff --git a/src/core/Meganav/component.rb b/src/core/Meganav/component.rb index 6f554c783..651250d1e 100644 --- a/src/core/Meganav/component.rb +++ b/src/core/Meganav/component.rb @@ -6,7 +6,7 @@ module Core class Meganav < ViewComponent::Base include MeganavConfig include Util - attr_reader :options, :login_link, :url_base + attr_reader :options, :login_link, :logo_link, :url_base renders_one :notice, AblyUi::Core::Notice @@ -14,6 +14,7 @@ def initialize( session_data: {}, theme_name: :white, login_link: '/login', + logo_link: '', url_base: AblyUi::Core::Util::DEFAULT_URL_BASE ) @session_data = session_data @@ -21,6 +22,7 @@ def initialize( @options = options @login_link = login_link @url_base = url_base + @logo_link = logo_link || url_base theme_setup(theme_name) end