From b6f20a6955e2a143b7a6a13b4bd847e7805725f7 Mon Sep 17 00:00:00 2001 From: jhoniernem Date: Wed, 27 Sep 2023 11:05:51 -0500 Subject: [PATCH] feat change type image to string (url) --- src/components/cards/categoryCard.tsx | 7 +------ .../containerCards/containerCardsCategory.tsx | 17 ++++++++--------- src/types/products.d.ts | 2 +- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/components/cards/categoryCard.tsx b/src/components/cards/categoryCard.tsx index 7d0fcb4..b1b587a 100644 --- a/src/components/cards/categoryCard.tsx +++ b/src/components/cards/categoryCard.tsx @@ -5,12 +5,7 @@ const CardCategory: React.FC = ({ name, image }) => { return (
- Imagen de Categoria + Imagen de Categoria

{name}

diff --git a/src/components/containerCards/containerCardsCategory.tsx b/src/components/containerCards/containerCardsCategory.tsx index 85a6591..5e29fc5 100644 --- a/src/components/containerCards/containerCardsCategory.tsx +++ b/src/components/containerCards/containerCardsCategory.tsx @@ -2,40 +2,39 @@ import React from 'react'; import CardCategory from '../cards/categoryCard'; import { CategoryProps } from '~/types/products'; -import { Images } from '~/assets/img'; const CATEGORIES: CategoryProps[] = [ { name: 'Farolas', - image: [Images.categories.Cat04], + image: 'https://i.postimg.cc/Gp1QbGmD/Cat04.png', }, { name: 'Stops', - image: [Images.categories.Cat05], + image: 'https://i.postimg.cc/6qQcDK51/Cat05.png', }, { name: 'Audio', - image: [Images.categories.Cat07], + image: 'https://i.postimg.cc/02bZn94z/Cat07.png', }, { name: 'Exploradoras', - image: [Images.categories.Cat06], + image: 'https://i.postimg.cc/gcMN3xg9/Cat06.png', }, { name: 'Exterior', - image: [Images.categories.Cat02], + image: 'https://i.postimg.cc/8P94nq8t/Cat03.png', }, { name: 'Interior', - image: [Images.categories.Cat08], + image: 'https://i.postimg.cc/Sx9d0Dkq/Cat08.png', }, { name: 'Bombillos', - image: [Images.categories.Cat03], + image: 'https://i.postimg.cc/63czjqwv/Cat02.png', }, { name: 'Repuestos', - image: [Images.categories.Cat01], + image: 'https://i.postimg.cc/rsYjTHDy/Cat01.png', }, ]; diff --git a/src/types/products.d.ts b/src/types/products.d.ts index 33c364d..5d5ae45 100644 --- a/src/types/products.d.ts +++ b/src/types/products.d.ts @@ -29,6 +29,6 @@ export interface ProductCardProps { } export type CategoryProps = { - image: StaticImageData[]; + image: string; name: string; } \ No newline at end of file