From 20e6abb48cada5348ddf921ac778c1fd1f45d11c Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sat, 5 Oct 2024 15:31:30 -0700 Subject: improve channel card component design --- src/components/ChannelCard/ChannelCard.tsx | 94 ++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/components/ChannelCard/ChannelCard.tsx (limited to 'src/components/ChannelCard/ChannelCard.tsx') diff --git a/src/components/ChannelCard/ChannelCard.tsx b/src/components/ChannelCard/ChannelCard.tsx new file mode 100644 index 0000000..83471f2 --- /dev/null +++ b/src/components/ChannelCard/ChannelCard.tsx @@ -0,0 +1,94 @@ +import React from 'react'; +import Image from 'next/image'; + +type ChannelCardProps = { + channel_id: string; + name: string; + avatarUrl: string; + subscriberCount: number; + videoCount: number; + viewCount: number; + suborg?: string; + nextMilestone: string; + nextMilestoneDays: string; + nextMilestoneDate: string; +}; + +const ChannelCard: React.FC = ({ + channel_id, + name, + avatarUrl, + subscriberCount, + videoCount, + viewCount, + suborg, + nextMilestone, + nextMilestoneDays, + nextMilestoneDate, +}) => { + return ( +
+
+ {name} +
+

+ {name} +

+ {suborg && ( +

+ {suborg} +

+ )} +
+
+
+
+

+ {subscriberCount.toLocaleString()} +

+

+ Subscribers +

+
+
+

+ {videoCount.toLocaleString()} +

+

+ Videos +

+
+
+

+ {viewCount.toLocaleString()} +

+

+ Views +

+
+
+
+

+ Next Milestone: {Number(nextMilestone).toLocaleString()} +

+

+ Estimated in {nextMilestoneDays} days ({nextMilestoneDate}) +

+
+ +
+ ); +}; + +export default ChannelCard; \ No newline at end of file -- cgit v1.2.3