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

Lucis/remove modals #189

Open
wants to merge 3 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
26 changes: 26 additions & 0 deletions .configs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"audience-everyone": {
"overrides": {},
"routes": [
{
"pathTemplate": "/*",
"handler": {
"url": "https://www.google.com",
"__resolveType": "$live/handlers/proxy.ts"
}
}
],
"__resolveType": "$live/flags/everyone.ts"
},
"./routes/[...catchall].tsx": {
"handler": {
"audiences": [
{
"__resolveType": "audience-everyone"
}
],
"__resolveType": "$live/handlers/routesSelection.ts"
},
"__resolveType": "resolve"
}
}
6 changes: 4 additions & 2 deletions components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ function Header(
<Navbar items={navItems} searchbar={searchbar} />
</div>

<Modals
{
/* <Modals
menu={{ items: navItems }}
searchbar={searchbar}
/>
/> */
}
</header>
</>
);
Expand Down
2 changes: 2 additions & 0 deletions components/product/ProductShelf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { mapProductToAnalyticsItem } from "deco-sites/std/commerce/utils/product
import { useOffer } from "deco-sites/fashion/sdk/useOffer.ts";
import type { LoaderReturnType } from "$live/types.ts";
import type { Product } from "deco-sites/std/commerce/types.ts";
import Counter from "../../islands/Counter.tsx";

export interface Props {
title: string;
Expand All @@ -31,6 +32,7 @@ function ProductShelf({
class="container grid grid-cols-[48px_1fr_48px] grid-rows-[48px_1fr_48px_1fr] py-10 px-0 sm:px-5"
>
<h2 class="text-center row-start-1 col-span-full">
<Counter />
<span class="font-medium text-2xl">{title}</span>
</h2>

Expand Down
8 changes: 8 additions & 0 deletions islands/Counter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { useState } from "preact/hooks";

export default function Counter() {
const [a, b] = useState(0);
return (
<button class="bg-red-900 text-white p-4" onClick={() => b(a + 1)}>{a}</button>
);
}
22 changes: 12 additions & 10 deletions live.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import * as $$$$$0 from "./islands/WishlistButton.tsx";
import * as $$$$$1 from "./islands/ShippingSimulation.tsx";
import * as $$$$$2 from "./islands/HeaderSearchbar.tsx";
import * as $$$$$3 from "./islands/HeaderButton.tsx";
import * as $$$$$4 from "./islands/AddToCartButton.tsx";
import * as $$$$$5 from "./islands/HeaderModals.tsx";
import * as $$$$$6 from "./islands/SliderJS.tsx";
import * as $$$$$7 from "./islands/ProductImageZoom.tsx";
import * as $$$$$8 from "./islands/SearchControls.tsx";
import * as $$$$$4 from "./islands/Counter.tsx";
import * as $$$$$5 from "./islands/AddToCartButton.tsx";
import * as $$$$$6 from "./islands/HeaderModals.tsx";
import * as $$$$$7 from "./islands/SliderJS.tsx";
import * as $$$$$8 from "./islands/ProductImageZoom.tsx";
import * as $$$$$9 from "./islands/SearchControls.tsx";
import * as $$$$$$$$0 from "./sections/WishlistGallery.tsx";
import * as $$$$$$$$1 from "./sections/LinkTree.tsx";
import * as $$$$$$$$2 from "./sections/Features.tsx";
Expand Down Expand Up @@ -151,14 +152,15 @@ const manifest = {
"./routes/live/workbench.ts": $live_workbench,
},
"islands": {
"./islands/AddToCartButton.tsx": $$$$$4,
"./islands/AddToCartButton.tsx": $$$$$5,
"./islands/Counter.tsx": $$$$$4,
"./islands/HeaderButton.tsx": $$$$$3,
"./islands/HeaderModals.tsx": $$$$$5,
"./islands/HeaderModals.tsx": $$$$$6,
"./islands/HeaderSearchbar.tsx": $$$$$2,
"./islands/ProductImageZoom.tsx": $$$$$7,
"./islands/SearchControls.tsx": $$$$$8,
"./islands/ProductImageZoom.tsx": $$$$$8,
"./islands/SearchControls.tsx": $$$$$9,
"./islands/ShippingSimulation.tsx": $$$$$1,
"./islands/SliderJS.tsx": $$$$$6,
"./islands/SliderJS.tsx": $$$$$7,
"./islands/WishlistButton.tsx": $$$$$0,
},
"sections": {
Expand Down
22 changes: 21 additions & 1 deletion schemas.gen.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"deco-sites/std/loaders/vtex/user.ts",
"deco-sites/std/loaders/vtex/wishlist.ts",
"./islands/AddToCartButton.tsx",
"./islands/Counter.tsx",
"./islands/HeaderButton.tsx",
"./islands/HeaderModals.tsx",
"./islands/HeaderSearchbar.tsx",
Expand Down Expand Up @@ -10311,6 +10312,22 @@
}
}
},
"Li9pc2xhbmRzL0NvdW50ZXIudHN4": {
"title": "./islands/Counter.tsx",
"type": "object",
"required": [
"__resolveType"
],
"properties": {
"__resolveType": {
"type": "string",
"enum": [
"./islands/Counter.tsx"
],
"default": "./islands/Counter.tsx"
}
}
},
"Li9pc2xhbmRzL0hlYWRlckJ1dHRvbi50c3g=": {
"title": "./islands/HeaderButton.tsx",
"type": "object",
Expand Down Expand Up @@ -11993,6 +12010,9 @@
{
"$ref": "#/definitions/Li9pc2xhbmRzL0FkZFRvQ2FydEJ1dHRvbi50c3g="
},
{
"$ref": "#/definitions/Li9pc2xhbmRzL0NvdW50ZXIudHN4"
},
{
"$ref": "#/definitions/Li9pc2xhbmRzL0hlYWRlckJ1dHRvbi50c3g="
},
Expand Down Expand Up @@ -12332,4 +12352,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion static/tailwind.css

Large diffs are not rendered by default.