Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

fix issue #299 - display filters when no product was found #319

Merged
merged 2 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/views/Category/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Page: React.FC<PageProps> = ({
<Breadcrumbs breadcrumbs={extractBreadcrumbs(category)} />
</div>

{hasProducts && (
{canDisplayProducts && (
<ProductFilters
filters={filters}
attributes={attributes}
Expand Down
6 changes: 3 additions & 3 deletions src/views/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ export const SearchView: React.FC<SearchViewProps> = ({
return isOnline ? (
<Error error={error.message} />
) : (
<OfflinePlaceholder />
);
<OfflinePlaceholder />
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the style was correct. Use prettier in vscode with default settings.

}

return (
<SearchPage onQueryChange={change} query={query}>
{hasProducts && canDisplayFilters && (
{canDisplayProducts && canDisplayFilters && (
<ProductFilters
attributes={data.attributes.edges.map(
edge => edge.node
Expand Down