diff --git a/src/components/CardAuthorBox.tsx b/src/components/CardAuthorBox.tsx new file mode 100644 index 0000000..fd7d4ee --- /dev/null +++ b/src/components/CardAuthorBox.tsx @@ -0,0 +1,58 @@ +import React, { FC } from "react"; +import { AuthorType } from "@/data/types"; +import { StarIcon } from "@heroicons/react/24/solid"; +import Avatar from "@/shared/Avatar"; +import Badge from "@/shared/Badge"; +import Link from "next/link"; + +export interface CardAuthorBoxProps { + className?: string; + author: AuthorType; + index?: number; +} + +const CardAuthorBox: FC = ({ + className = "", + author, + index, +}) => { + const { displayName, href = "/", avatar, starRating } = author; + return ( + + {index && ( + + )} + +
+

+ {displayName} +

+ + New York + +
+
+ + {starRating || 4.9} + + +
+ + ); +}; + +export default CardAuthorBox;