posts: refactor post previews to use ViewComponent.
Refactor the post preview html to use the ViewComponent framework. This lets us encapsulate all the HTML, CSS, and helper methods for a UI component in a single place. See https://viewcomponent.org.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<div class="post-tooltip-body <%= "has-preview" if params[:preview].truthy? %>">
|
||||
<div class="post-tooltip-body-left">
|
||||
<% if params[:preview].truthy? %>
|
||||
<%= PostPresenter.preview(@post, show_deleted: true, compact: true) %>
|
||||
<%= post_preview(@post, show_deleted: true, compact: true) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user