From e2dd854f10e839321a0e379edf764b44e4508bca Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Mon, 19 Oct 2020 16:53:02 -0300 Subject: [PATCH] Utilities to handle Colors --- components/product/ProductView/ProductView.tsx | 1 - lib/colors.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/components/product/ProductView/ProductView.tsx b/components/product/ProductView/ProductView.tsx index a0016365f..444ab4e42 100644 --- a/components/product/ProductView/ProductView.tsx +++ b/components/product/ProductView/ProductView.tsx @@ -1,7 +1,6 @@ import { NextSeo } from 'next-seo' import { FC, useState } from 'react' import s from './ProductView.module.css' -import { Colors } from '@components/ui/types' import { useUI } from '@components/ui/context' import { Button, Container } from '@components/ui' import { Swatch, ProductSlider } from '@components/product' diff --git a/lib/colors.ts b/lib/colors.ts index fbd1443ea..2ee56b150 100644 --- a/lib/colors.ts +++ b/lib/colors.ts @@ -16,6 +16,7 @@ export function getRandomPairOfColors() { } function hexToRgb(hex: string = '') { + // @ts-ignore const match = hex.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i) if (!match) {