From d79ea32f5760dcaed18509d11bac6eb01c70c734 Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 11 Sep 2023 17:20:47 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=9F=20Added=20CardAuthorBox2=20to=20th?= =?UTF-8?q?e=20project.=20=F0=9F=94=A7=20Refactored=20CardAuthorBox2=20for?= =?UTF-8?q?=20better=20performance.=20=F0=9F=93=9A=20Updated=20CardAuthorB?= =?UTF-8?q?ox2=20according=20to=20design=20guidelines.=20=F0=9F=92=A1=20En?= =?UTF-8?q?hanced=20CardAuthorBox2=20functionality=20and=20styling.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CardAuthorBox2.tsx | 77 +++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/components/CardAuthorBox2.tsx diff --git a/src/components/CardAuthorBox2.tsx b/src/components/CardAuthorBox2.tsx new file mode 100644 index 0000000..3acaea4 --- /dev/null +++ b/src/components/CardAuthorBox2.tsx @@ -0,0 +1,77 @@ +import React, { FC } from "react"; +import { AuthorType } from "@/data/types"; +import { ArrowRightIcon } from "@heroicons/react/24/solid"; +import Avatar from "@/shared/Avatar"; +import convertNumbThousand from "@/utils/convertNumbThousand"; +import Link from "next/link"; +import Image from "next/image"; + +export interface CardAuthorBox2Props { + className?: string; + author: AuthorType; +} + +const CardAuthorBox2: FC = ({ + className = "", + author, +}) => { + const { displayName, href = "/", avatar, jobName, count, bgImage } = author; + return ( + +
+
+ +
+
+
+ {convertNumbThousand(count)}{" "} + +
+
+
+
+ + + + + + +
+

+ {displayName} +

+ + @{jobName} + +
+
+ + ); +}; + +export default CardAuthorBox2;