<% dtext_data = DText.preprocess(@comments.map(&:body)) %> <% @comments.each do |comment| %> <%= tag.div id: "post_#{comment.post.id}", **PostPreviewComponent.new(post: comment.post).article_attrs("post") do %>
<% if policy(comment.post).visible? %> <%= link_to(image_tag(comment.post.preview_file_url), post_path(comment.post)) %> <% end %>
<%= render_comment(comment, dtext_data: dtext_data, context: :index_by_comment, current_user: CurrentUser.user) %> <% end %> <% end %>
<%= numbered_paginator(@comments) %>