Skip to content

Commit

Permalink
fix: Colors removed
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriassuncx committed Aug 1, 2024
1 parent 606e008 commit 92c3bea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
5 changes: 1 addition & 4 deletions components/product/ProductInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ import { ProductDetailsPage } from "apps/commerce/types.ts";
import { mapProductToAnalyticsItem } from "apps/commerce/utils/productToAnalyticsItem.ts";
import ProductSelector from "./ProductVariantSelector.tsx";
import Icon from "deco-sites/maconequiio/components/ui/Icon.tsx";
import type { Color } from "deco-sites/maconequiio/loaders/Colors/colors.ts";
import Variants from "deco-sites/maconequiio/components/product/Variants.tsx";
import { useVariantPossibilities } from "deco-sites/maconequiio/sdk/useVariantPossiblities.ts";

export interface Props {
page: ProductDetailsPage | null;
colors: Color[];
layout: {
/**
* @title Product Name
Expand All @@ -35,7 +33,7 @@ export interface Props {
};
}

function ProductInfo({ page, colors = [], layout }: Props) {
function ProductInfo({ page, layout }: Props) {
const platform = usePlatform();
const id = useId();

Expand Down Expand Up @@ -144,7 +142,6 @@ function ProductInfo({ page, colors = [], layout }: Props) {
<ProductSelector
possibilities={possibilities}
url={url ?? ""}
colors={colors}
/>
)}

Expand Down
5 changes: 1 addition & 4 deletions components/product/ProductVariantSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import Avatar from "$store/components/ui/Avatar.tsx";
import { type Possibilities } from "$store/sdk/useVariantPossiblities.ts";
import { relative } from "$store/sdk/url.ts";
import type { Color } from "deco-sites/maconequiio/loaders/Colors/colors.ts";

interface Props {
possibilities: Possibilities;
url: string;
colors: Color[];
}

function VariantSelector({ possibilities, url, colors }: Props) {
function VariantSelector({ possibilities, url }: Props) {
return (
<div class="flex flex-col mt-4 sm:mt-6">
<ul class="flex flex-col gap-4">
Expand All @@ -26,7 +24,6 @@ function VariantSelector({ possibilities, url, colors }: Props) {
<li class="h-8">
<button f-partial={relativeLink} f-client-nav>
<Avatar
colors={colors}
content={value}
variant={relativeLink === relativeUrl
? "active"
Expand Down
3 changes: 0 additions & 3 deletions components/ui/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* TODO: Figure out a better name for this component.
*/

import type { Color } from "deco-sites/maconequiio/loaders/Colors/colors.ts";

const colors: Record<string, string> = {
"Azul": "bg-[#87CEFA] ring-[#87CEFA]",
"Branco": "bg-[#FFFFFF] ring-[#FFFFFF]",
Expand All @@ -26,7 +24,6 @@ const colors: Record<string, string> = {
interface Props {
variant?: "active" | "disabled" | "default";
content: string;
colors: Color[];
}

const variants = {
Expand Down

0 comments on commit 92c3bea

Please sign in to comment.