Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] CACHE API support #43

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 4 additions & 5 deletions components/search/SearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export interface Props {
*/
highlights?: HighLight[];
/**
*
* @description Not found section, displayed when no products are found
*/
notFoundSection: Section;
Expand All @@ -36,10 +35,9 @@ export interface Props {
function Result({
page,
variant,
highlights
highlights,
}: Omit<Omit<Props, "page">, "notFoundSection"> & {
page: ProductListingPage;

}) {
const { products, filters, breadcrumb, pageInfo, sortOptions } = page;

Expand All @@ -48,7 +46,7 @@ function Result({
Produtos encontrados: <strong>{pageInfo.records} resultados</strong>
</h6>
);

return (
<>
<div>
Expand Down Expand Up @@ -84,7 +82,7 @@ function Result({
{productsFound}
</div>
<div class="flex-grow">
<ProductGallery products={products} highlights={highlights }/>
<ProductGallery products={products} highlights={highlights} />
<SearchPagination pageInfo={pageInfo} />
</div>
</div>
Expand Down Expand Up @@ -122,6 +120,7 @@ function SearchResult(
return <NotFoundSection {...notFoundProps} />;
}

console.log("Page Data: ", page);
return <Result {...props} page={page} />;
}

Expand Down
4 changes: 2 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"deco-sites/lojastopmoveis/": "./",
"$store/": "./",
"deco-sites/std/": "https://denopkg.com/deco-sites/[email protected]/",
"$live/": "https://denopkg.com/deco-cx/deco@1.75.2/",
"deco/": "https://denopkg.com/deco-cx/deco@1.75.2/",
"$live/": "https://denopkg.com/deco-cx/deco@1186959dee2de7cfa71060446c0189aa99665d8d/",
"deco/": "https://denopkg.com/deco-cx/deco@1186959dee2de7cfa71060446c0189aa99665d8d/",
"$fresh/": "https://deno.land/x/[email protected]/",
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
Expand Down
Loading