Skip to content

Commit

Permalink
fix: updates conditionals to make image optional (#1965)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflips authored and kajabi-bot committed Sep 3, 2024
1 parent 085e336 commit c0e3ff2
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<span class="sage-hero__artwork-image-container">
#{image_tag(component.image, image_options)}
</span>
).html_safe
).html_safe if component.image.present?
%>

<article
Expand Down Expand Up @@ -45,7 +45,7 @@
<% end %>
</div>

<% if component.cta_attributes.present? %>
<% if component.cta_attributes.present? && artwork.present? %>
<a
<% component.cta_attributes.each do |key, value| %>
<%= "#{key}='#{value}'".html_safe %>
Expand All @@ -55,9 +55,11 @@
<%= artwork %>
</a>
<% else %>
<div class="sage-hero__artwork">
<%= artwork %>
</div>
<% if artwork.present? %>
<div class="sage-hero__artwork">
<%= artwork %>
</div>
<% end %>
<% end %>

</article>

0 comments on commit c0e3ff2

Please sign in to comment.