Skip to content

Commit

Permalink
Remove unpublished books from the creator profile
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhbhatia committed Jan 6, 2025
1 parent adc3c78 commit 75f8f42
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/profiles/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@
<div class="py-10 border-t text-center">
<ul class="grid gap-4 mt-4 sm:grid-cols-6 lg:grid-cols-3">
<% @creator_profile.collaborations.each do |collaboration| %>
<%= render(Products::CardComponent.new(product: collaboration.product)) %>
<% product = collaboration.product %>
<% if product.published? %>
<%= cache product do %>
<%= render(Products::CardComponent.new(product: product)) %>
<% end %>
<% end %>
<% end %>
</ul>
</div>
Expand Down

0 comments on commit 75f8f42

Please sign in to comment.