Skip to content

Commit

Permalink
Show an icon when the list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJackson-Oslo committed Feb 19, 2024
1 parent ebd73d1 commit 2cea663
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
7 changes: 7 additions & 0 deletions app/assets/images/empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions app/views/spaces/index/_space_listing_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<div class="flex">
<h1 class="text-2xl mt-1"><%= t('space_filter.spaces_that_might_work', count: space_count ) %></h1>
</div>

<h1 class="text-base mb-6 text-gray-500 text-center">
<% if space_count == 0 %>
<div class="text-lnu-pink flex flex-col place-items-center place-content-center md:h-screen-2/3">
<%= inline_svg_tag 'empty', class: 'max-w-24 inline-block', alt: "" %>
<span class="text-gray-800"><%= t('space_filter.spaces_that_might_work', count: 0 ) %></span>
</div>
<% else %>
<%= t('space_filter.spaces_that_might_work', count: space_count ) %>
<% end %>
</h1>
1 change: 0 additions & 1 deletion app/views/spaces/index/_space_listings.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<%= render partial: 'spaces/index/space_listing_header', locals: { space_count: space_count } %>
<%= t('space_listing.no_results') if spaces.empty? %>
<% spaces.each do |space| %>
<%= render partial: "spaces/index/space_listing", locals: { space: space, filtered_facilities: filtered_facilities } %>
<% end %>
Expand Down

0 comments on commit 2cea663

Please sign in to comment.