Skip to content
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
6 changes: 3 additions & 3 deletions components/search/Searchbar/Suggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function Suggestions(
{ suggestion }: ComponentProps<typeof loader, typeof action>,
) {
const { products = [], searches = [] } = suggestion ?? {};
const hasProducts = Boolean(products.length);
const hasTerms = Boolean(searches.length);
const hasProducts = Boolean(products?.length);
const hasTerms = Boolean(searches?.length);
return (
<div
class={clx(`overflow-y-scroll`, !hasProducts && !hasTerms && "hidden")}
Expand Down Expand Up @@ -72,7 +72,7 @@ function Suggestions(
Produtos sugeridos
</span>
<Slider class="carousel">
{products.map((product, index) => (
{products?.map((product, index) => (
<Slider.Item
index={index}
class="carousel-item first:ml-4 last:mr-4 min-w-[200px] max-w-[200px]"
Expand Down
6 changes: 6 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
/// <reference lib="dom" />
/// <reference lib="deno.ns" />
/// <reference lib="esnext" />
/// <reference lib="dom.iterable" />

// these imports are needed to make deno deploy include the files in the bundle
// because we are importing these dynamically in the code and DD doesn't recognize them to be included
import "./components/shipping/Results.tsx";
import "./components/search/Searchbar/Suggestions.tsx";

import { start } from "$fresh/server.ts";
import config from "./fresh.config.ts";
Expand Down