From 9942a0861457369fa11d9734ae4ecfcf0f4bfe0e Mon Sep 17 00:00:00 2001 From: Itamar Rocha Filho Date: Tue, 16 Jul 2024 14:53:42 -0300 Subject: [PATCH 1/4] Test CACHE API --- deno.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index 33642ee..0efb90f 100644 --- a/deno.json +++ b/deno.json @@ -30,8 +30,8 @@ "deco-sites/lojastopmoveis/": "./", "$store/": "./", "deco-sites/std/": "https://denopkg.com/deco-sites/std@1.26.6/", - "$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@8b979f3fc0ba803f7d368774d8f5da0578fd1539/", + "deco/": "https://denopkg.com/deco-cx/deco@8b979f3fc0ba803f7d368774d8f5da0578fd1539/", "$fresh/": "https://deno.land/x/fresh@1.6.5/", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", From 3f2d944b0c300bd6be129e9ecf08ed455f45cb9b Mon Sep 17 00:00:00 2001 From: Itamar Rocha Filho Date: Tue, 16 Jul 2024 15:12:16 -0300 Subject: [PATCH 2/4] Update deno.json - Test with logs --- deno.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index 0efb90f..a2fb760 100644 --- a/deno.json +++ b/deno.json @@ -30,8 +30,8 @@ "deco-sites/lojastopmoveis/": "./", "$store/": "./", "deco-sites/std/": "https://denopkg.com/deco-sites/std@1.26.6/", - "$live/": "https://denopkg.com/deco-cx/deco@8b979f3fc0ba803f7d368774d8f5da0578fd1539/", - "deco/": "https://denopkg.com/deco-cx/deco@8b979f3fc0ba803f7d368774d8f5da0578fd1539/", + "$live/": "https://denopkg.com/deco-cx/deco@8a15d52f9c0c07f775d76f3a79591328a488d587/", + "deco/": "https://denopkg.com/deco-cx/deco@8a15d52f9c0c07f775d76f3a79591328a488d587/", "$fresh/": "https://deno.land/x/fresh@1.6.5/", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", From c8db14a9f2a5dcc8c3d064d8e39f21a213deee70 Mon Sep 17 00:00:00 2001 From: Itamar Rocha Filho Date: Wed, 17 Jul 2024 12:25:46 -0300 Subject: [PATCH 3/4] Add logs and update deco to version with more logs --- components/search/SearchResult.tsx | 3 +++ deno.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/search/SearchResult.tsx b/components/search/SearchResult.tsx index f8eaec8..790dddb 100644 --- a/components/search/SearchResult.tsx +++ b/components/search/SearchResult.tsx @@ -11,6 +11,7 @@ import Breadcrumb from "$store/components/ui/Breadcrumb.tsx"; import SearchPagination from "$store/components/search/SearchPagination.tsx"; import { Section } from "$live/blocks/section.ts"; import { HighLight } from "$store/components/product/ProductHighlights.tsx"; +import { logger } from "../../../deco/mod.ts"; export interface Props { page: LoaderReturnType; @@ -122,6 +123,8 @@ function SearchResult( return ; } + logger.info('Page Data: ', page); + console.log('Page Data: ', page); return ; } diff --git a/deno.json b/deno.json index a2fb760..bcbb49e 100644 --- a/deno.json +++ b/deno.json @@ -30,8 +30,8 @@ "deco-sites/lojastopmoveis/": "./", "$store/": "./", "deco-sites/std/": "https://denopkg.com/deco-sites/std@1.26.6/", - "$live/": "https://denopkg.com/deco-cx/deco@8a15d52f9c0c07f775d76f3a79591328a488d587/", - "deco/": "https://denopkg.com/deco-cx/deco@8a15d52f9c0c07f775d76f3a79591328a488d587/", + "$live/": "https://denopkg.com/deco-cx/deco@1186959dee2de7cfa71060446c0189aa99665d8d/", + "deco/": "https://denopkg.com/deco-cx/deco@1186959dee2de7cfa71060446c0189aa99665d8d/", "$fresh/": "https://deno.land/x/fresh@1.6.5/", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", From e23635343b19d996099a7fb60f345ef181f6b2e3 Mon Sep 17 00:00:00 2001 From: Itamar Rocha Filho Date: Wed, 17 Jul 2024 12:33:04 -0300 Subject: [PATCH 4/4] Remove logger --- components/search/SearchResult.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/components/search/SearchResult.tsx b/components/search/SearchResult.tsx index 790dddb..ebeb404 100644 --- a/components/search/SearchResult.tsx +++ b/components/search/SearchResult.tsx @@ -11,7 +11,6 @@ import Breadcrumb from "$store/components/ui/Breadcrumb.tsx"; import SearchPagination from "$store/components/search/SearchPagination.tsx"; import { Section } from "$live/blocks/section.ts"; import { HighLight } from "$store/components/product/ProductHighlights.tsx"; -import { logger } from "../../../deco/mod.ts"; export interface Props { page: LoaderReturnType; @@ -28,7 +27,6 @@ export interface Props { */ highlights?: HighLight[]; /** - * * @description Not found section, displayed when no products are found */ notFoundSection: Section; @@ -37,10 +35,9 @@ export interface Props { function Result({ page, variant, - highlights + highlights, }: Omit, "notFoundSection"> & { page: ProductListingPage; - }) { const { products, filters, breadcrumb, pageInfo, sortOptions } = page; @@ -49,7 +46,7 @@ function Result({ Produtos encontrados: {pageInfo.records} resultados ); - + return ( <>
@@ -85,7 +82,7 @@ function Result({ {productsFound}
- +
@@ -123,8 +120,7 @@ function SearchResult( return ; } - logger.info('Page Data: ', page); - console.log('Page Data: ', page); + console.log("Page Data: ", page); return ; }