Skip to content

Commit

Permalink
feat: finalizado 80% da home Desktop. falta Footer e mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
caiodna360 committed Dec 15, 2023
1 parent 975b3f6 commit 027567d
Show file tree
Hide file tree
Showing 13 changed files with 532 additions and 52 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Storefront starter by deco.cx

"access_token": "tcs_world_87fcfcee43194e71a38974f4494275be",
"TCS-Access-Token": "tcs_world_87fcfcee43194e71a38974f4494275be",

A fully featured starter to help you customize and deploy an ecommerce website.
in minutes.
Expand Down
65 changes: 65 additions & 0 deletions components/product/CustomOddGrid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { SendEventOnView } from "$store/components/Analytics.tsx";
import ProductCardOdd, {
Layout as cardLayout,
} from "$store/components/product/ProductCardOdd.tsx";
// import Icon from "$store/components/ui/Icon.tsx";
import Header from "$store/components/ui/SectionHeader.tsx";
import { useId } from "$store/sdk/useId.ts";
// import { useOffer } from "$store/sdk/useOffer.ts";
import { usePlatform } from "$store/sdk/usePlatform.tsx";
import type { Product } from "apps/commerce/types.ts";
import type { ImageWidget } from "apps/admin/widgets.ts";
// import { mapProductToAnalyticsItem } from "apps/commerce/utils/productToAnalyticsItem.ts";

export interface Props {
products: Product[] | null;
title?: string;
imageUrl?: ImageWidget;
description?: string;
layout?: {
headerAlignment?: "center" | "left";
headerfontSize?: "Normal" | "Large";
};
cardLayout?: cardLayout;
}

function CustomOddGrid({
products,
title,
description,
layout,
cardLayout,
imageUrl,
}: Props) {
const id = useId();
const platform = usePlatform();

if (!products || products.length === 0) {
return null;
}

return (
<div class="w-full container">
<Header
title={title || ""}
description={description || ""}
fontSize={"Large"}
alignment={"center"}
image={imageUrl}
/>
<div id={id} class="shelf-custom-items odd">
{products?.map((product, index) => (
<ProductCardOdd
product={product}
itemListName={title}
layout={cardLayout}
platform={platform}
index={index}
/>
))}
</div>
</div>
);
}

export default CustomOddGrid;
Loading

0 comments on commit 027567d

Please sign in to comment.