Ensuring optionally rendering dashboard listings (#16467)

Relates to forem/rfcs#291, #16420, #16437, #16423, and #16461.
This commit is contained in:
Jeremy Friesen 2022-02-08 13:41:22 -05:00 committed by GitHub
parent 7a4b618821
commit d19dad3b28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -63,12 +63,14 @@
</a>
</li>
<%- if Listing.feature_enabled? %>
<li>
<a class="crayons-link crayons-link--block" href="/listings/dashboard" data-no-instant>
<%= t("views.dashboard.actions.listings") %>
<%= crayons_icon_tag("external-link", class: "ml-1") %>
</a>
</li>
<%- end %>
<li>
<a class="crayons-link crayons-link--block" href="<%= dashboard_analytics_path %>">

View file

@ -11,10 +11,12 @@
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.views") %></span>
</div>
<%- if Listing.feature_enabled? %>
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= @user.listings.size %></strong>
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.listings") %></span>
</div>
<%- end %>
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= @user.unspent_credits_count %></strong>