This commit is contained in:
Sachin Chaurasiya 2022-01-17 12:46:06 +05:30 committed by GitHub
parent 94cd991462
commit 099ddbbce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -45,8 +45,9 @@ const FacetFilter: FunctionComponent<FacetProp> = ({
)
);
};
const getSeparator = (length: number, index: number, flag: boolean) => {
return length !== 1 && index < length - 1 && flag ? (
const getSeparator = (length: number, index: number) => {
return length !== 1 && index < length - 1 ? (
<div className="tw-filter-seperator" />
) : null;
};
@ -187,11 +188,7 @@ const FacetFilter: FunctionComponent<FacetProp> = ({
<div className="sidebar-my-data-holder mt-2 mb-3">
{getFilterItems(aggregation)}
</div>
{getSeparator(
aggregations.length,
index,
aggregations[index + 1]?.buckets?.length > 0
)}
{getSeparator(aggregations.length, index)}
</>
) : null}
</Fragment>

View File

@ -269,7 +269,9 @@ const TagsPage = () => {
</p>
{getCountBadge(
category.children?.length || 0,
currentCategory?.name === category.name
? currentCategory.children?.length
: category.children?.length || 0,
'tw-self-center',
currentCategory?.name === category.name
)}