From c76c00678510552bc0e91f757d298d59e63f1eaa Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 11 Sep 2023 17:18:34 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Refactored=20the=20Card?= =?UTF-8?q?Category3=20component=20=F0=9F=93=A6=20Improved=20code=20struct?= =?UTF-8?q?ure=20and=20readability=20=F0=9F=8C=9F=20Added=20hover=20effect?= =?UTF-8?q?=20to=20the=20image=20=F0=9F=94=A7=20Fixed=20minor=20styling=20?= =?UTF-8?q?issues=20=F0=9F=92=A1=20Enhanced=20performance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CardCategory3.tsx | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/components/CardCategory3.tsx diff --git a/src/components/CardCategory3.tsx b/src/components/CardCategory3.tsx new file mode 100644 index 0000000..e62ff53 --- /dev/null +++ b/src/components/CardCategory3.tsx @@ -0,0 +1,47 @@ +import React, { FC } from "react"; +import { TaxonomyType } from "@/data/types"; +import convertNumbThousand from "@/utils/convertNumbThousand"; +import Link from "next/link"; +import Image from "next/image"; + +export interface CardCategory3Props { + className?: string; + taxonomy: TaxonomyType; +} + +const CardCategory3: FC = ({ + className = "", + taxonomy, +}) => { + const { count, name, href = "/", thumbnail } = taxonomy; + return ( + +
+ places + +
+
+

+ {name} +

+ + {convertNumbThousand(count || 0)} properties + +
+ + ); +}; + +export default CardCategory3;