refactor: hide filters options if no facets are found

staging
abhisheks 2023-12-14 16:56:42 +05:30
parent 22742e7420
commit c3aad31794
1 changed files with 9 additions and 7 deletions

View File

@ -29,13 +29,15 @@
<div class="flex justify-between"> <div class="flex justify-between">
<!-- Show Filters Button --> <!-- Show Filters Button -->
<div class="flex"> <div class="flex">
<button id="show-filters" type="button" class="flex space-x-2 items-center"> {if !empty($listing.rendered_facets)}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-filter" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <button id="show-filters" type="button" class="flex space-x-2 items-center">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-filter" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /> <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
</svg> <path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" />
<span> Filter </span> </svg>
</button> <span> Filter </span>
</button>
{/if}
</div> </div>
<!-- Sort By Dropdown --> <!-- Sort By Dropdown -->
<div class="flex max-w-[240px]"> <div class="flex max-w-[240px]">