docbrown/app/views/notifications/_reaction.html.erb
ludwiczakpawel 5d3691bcc5
Notifications redesign (#11084)
* notifications

* fix

* .

* REVERT

* .

* drop ccss

* REVERT

* specs

* drop colons

* fixse

* fix

* spec 1

* eh

* Fix notification specs

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-29 20:38:17 +01:00

7 lines
346 B
Text

<%# missing cache key %>
<% siblings = notification.json_data["reaction"]["aggregated_siblings"].select { |n| n["created_at"] > 24.hours.ago } %>
<% if siblings.length == 0 %>
<%= render "single_reaction", notification: notification %>
<% else %>
<%= render "aggregated_reactions", notification: notification, siblings: siblings %>
<% end %>