posts: fix recommended posts layout.
Fix recommended posts page to use new post gallery component.
This commit is contained in:
@@ -33,7 +33,7 @@ class PostPreviewComponent < ApplicationComponent
|
||||
@link_target = link_target
|
||||
@pool = pool
|
||||
@similarity = similarity.round(1) if similarity.present?
|
||||
@recommended = recommended.round(1) if recommended.present?
|
||||
@recommended = recommended
|
||||
@compact = compact
|
||||
@show_size = show_size
|
||||
@current_user = current_user
|
||||
|
||||
@@ -1,9 +1 @@
|
||||
<section class="recommended-posts user-disable-cropped-<%= CurrentUser.user.disable_cropped_thumbnails? %>">
|
||||
<% if @recs.empty? %>
|
||||
No recommendations found.
|
||||
<% end %>
|
||||
|
||||
<% @recs.each do |rec| %>
|
||||
<%= post_preview(rec[:post], recommended: 100*rec[:score]) %>
|
||||
<% end %>
|
||||
</section>
|
||||
<%= render_post_gallery(@posts, recommended: true) %>
|
||||
|
||||
Reference in New Issue
Block a user