Skip to content

Commit

Permalink
fix children not in correct order in filter badges
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Jan 24, 2024
1 parent 6ee76f1 commit 3e1c8b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Common/hooks/useFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ export default function useFilters({
{compiledBadges.map((props) => (
<FilterBadge {...props} name={t(props.name)} key={props.name} />
))}
{activeFilters.length >= 1 && (
{children}
{(activeFilters.length >= 1 || children) && (
<button
id="clear-all-filters"
className="rounded-full border border-gray-300 bg-white px-2 py-1 text-xs text-gray-600 hover:text-gray-800"
Expand All @@ -194,7 +195,6 @@ export default function useFilters({
{t("clear_all_filters")}
</button>
)}
{children}
</div>
);
};
Expand Down

0 comments on commit 3e1c8b9

Please sign in to comment.