[15 Min Fix]: Fix template error in badge achievement notification view (#13186)

* Fix template error in badge achievement notification view

Fixes https://app.honeybadger.io/projects/72638/faults/78624140.

* hello travis are you there its me vaidehi

* why arent you building my PR come onnnnn
This commit is contained in:
Vaidehi Joshi 2021-03-30 10:45:37 -07:00 committed by GitHub
parent 7af30e8bfc
commit 7fbbfa0a2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,8 @@
</div>
<p class="self-stretch"><a href="<%= json_data["user"]["path"] %>" class="crayons-btn w-100 m:w-50">Visit your profile</a></p>
<% unless json_data["badge_achievement"]["badge"]["credits_awarded"].zero? %>
<% credits_awarded = json_data["badge_achievement"]["badge"]["credits_awarded"] %>
<% unless credits_awarded.present? && credits_awarded.zero? %>
<p class="max-w-75 mx-auto">You also get <a href="/credits" class="crayons-link crayons-link--brand fw-bold"><%= json_data["badge_achievement"]["badge"]["credits_awarded"] %> new credits</a> to use for <a href="/listings">community listings</a> if you have anything you'd like to promote. 🎉</p>
<p class="fs-s"><a href="<%= about_listings_url %>" class="crayons-link crayons-link--secondary">More information about listings<a></p>
<% end %>