<commit_before><% title "Apps" %>
<% activate_nav! :discover %>

<%= render 'shared/navbar' %>

<% if @showcases && @showcases.map(&:slug).include?(params[:showcase]) %>
  <div class="container">
    <div class="clearfix mxn2 py2">
      <div class="rounded text-white bg-gray-2 p3">
        <div class="clearfix">
          <div class="col col-8">
            <span class="caps mt0 mb0">Trending</span>
            <h2 class="mt0"><%= t "#{params[:showcase]}.hero_title", scope: :showcases %></h2>
          </div>
          <div class="col col-4">
            <span class="right mb0" style="font-size: 28px; margin-top: 22px"><%= @products_count %></span>
          </div>
        </div>
      </div>
    </div>
  </div>
<% end %>

<%= react_component 'Apps',
      search: params[:search],
      filter: params[:filter] || 'trending',
      page: params[:page] || 1,
      total_pages: @total_pages,
      topics: @topics,
      showcases: (@showcases ? @showcases.map(&:slug).map{|slug|
        I18n.t(slug, scope: :showcases).merge(slug: slug)
      } : nil)
%>

<%= render 'shared/footer' %><commit_msg>fix paging on apps page<commit_after><% title "Apps" %>
<% activate_nav! :discover %>

<%= render 'shared/navbar' %>

<% if @showcases && @showcases.map(&:slug).include?(params[:showcase]) %>
  <div class="container">
    <div class="clearfix mxn2 py2">
      <div class="rounded text-white bg-gray-2 p3">
        <div class="clearfix">
          <div class="col col-8">
            <span class="caps mt0 mb0">Trending</span>
            <h2 class="mt0"><%= t "#{params[:showcase]}.hero_title", scope: :showcases %></h2>
          </div>
          <div class="col col-4">
            <span class="right mb0" style="font-size: 28px; margin-top: 22px"><%= @products_count %></span>
          </div>
        </div>
      </div>
    </div>
  </div>
<% end %>

<%= react_component 'Apps',
      search: params[:search],
      filter: params[:filter] || 'trending',
      page: [params[:page].to_i, 1].max,
      total_pages: @total_pages,
      topics: @topics,
      showcases: (@showcases ? @showcases.map(&:slug).map{|slug|
        I18n.t(slug, scope: :showcases).merge(slug: slug)
      } : nil)
%>

<%= render 'shared/footer' %>
{'fraction_non_alphanumeric': 0.20250335270451497, 'fraction_numerical': 0.016987036209208762, 'mean_word_length': 2.7804054054054053, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3840327', 'n_tokens_mistral': 819, 'n_tokens_neox': 787, 'n_words': 164}