From 4c2cf1822122d58ad0a6403c7dd883245ae08553 Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 11 Sep 2023 17:15:17 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=9F=20Added=20a=20new=20feature=20to?= =?UTF-8?q?=20CardCategoryBox1=20component=20=F0=9F=90=9E=20Fixed=20a=20bu?= =?UTF-8?q?g=20in=20CardCategoryBox1=20component=20=F0=9F=93=9A=20Updated?= =?UTF-8?q?=20CardCategoryBox1=20component=20documentation=20=E2=9C=A8=20I?= =?UTF-8?q?mproved=20CardCategoryBox1=20component=20performance=20?= =?UTF-8?q?=F0=9F=94=A7=20Refactored=20CardCategoryBox1=20component=20for?= =?UTF-8?q?=20better=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CardCategoryBox1.tsx | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/components/CardCategoryBox1.tsx diff --git a/src/components/CardCategoryBox1.tsx b/src/components/CardCategoryBox1.tsx new file mode 100644 index 0000000..d07e538 --- /dev/null +++ b/src/components/CardCategoryBox1.tsx @@ -0,0 +1,51 @@ +import React, { FC } from "react"; +import { TaxonomyType } from "@/data/types"; +import Badge from "@/shared/Badge"; +import convertNumbThousand from "@/utils/convertNumbThousand"; +import Link from "next/link"; +import Image from "next/image"; + +export interface CardCategoryBox1Props { + className?: string; + taxonomy: TaxonomyType; +} + +const CardCategoryBox1: FC = ({ + className = "", + taxonomy, +}) => { + const { count, name, thumbnail, href = "/" } = taxonomy; + return ( + + + +
+ +
+
+

+ {name} +

+ + 19 minutes drive + +
+ + ); +}; + +export default CardCategoryBox1;