refactor: hide filters options if no facets are found

pagebuilder
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,6 +29,7 @@
<div class="flex justify-between"> <div class="flex justify-between">
<!-- Show Filters Button --> <!-- Show Filters Button -->
<div class="flex"> <div class="flex">
{if !empty($listing.rendered_facets)}
<button id="show-filters" type="button" class="flex space-x-2 items-center"> <button id="show-filters" type="button" class="flex space-x-2 items-center">
<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"> <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 stroke="none" d="M0 0h24v24H0z" fill="none"/> <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
@ -36,6 +37,7 @@
</svg> </svg>
<span> Filter </span> <span> Filter </span>
</button> </button>
{/if}
</div> </div>
<!-- Sort By Dropdown --> <!-- Sort By Dropdown -->
<div class="flex max-w-[240px]"> <div class="flex max-w-[240px]">