From 77a0b69d9a0dd755a0a59a4c1dc3f3d045327e89 Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 22 Nov 2023 21:58:45 -0800
Subject: feat: re-implement individual statistic pages on next

---
 .../SubscriberTable/SubscriberTableRow.tsx         | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 src/components/SubscriberTable/SubscriberTableRow.tsx

(limited to 'src/components/SubscriberTable/SubscriberTableRow.tsx')

diff --git a/src/components/SubscriberTable/SubscriberTableRow.tsx b/src/components/SubscriberTable/SubscriberTableRow.tsx
new file mode 100644
index 0000000..e97af1c
--- /dev/null
+++ b/src/components/SubscriberTable/SubscriberTableRow.tsx
@@ -0,0 +1,35 @@
+"use client"
+import React from 'react';
+import Image from 'next/image';
+import { ChannelDataProp } from './SubscriberTable';
+
+interface ChannelRowProps {
+    channel: ChannelDataProp;
+    index: number;
+}
+
+const ChannelRow: React.FC<ChannelRowProps> = ({ channel, index }) => (
+<tr key={index} className="border-b hover:bg-gray-100 cursor-pointer" onClick={() => window.location.href = "/stats/"+channel.channel_name}>
+        <td className="py-3 px-1 sm:px-3 hidden sm:table-cell">{index + 1}</td>
+        <td className="py-3 px-1 sm:px-3 flex items-center">
+            <Image
+                src={channel.profile_pic}
+                alt={channel.channel_name}
+                width={50}
+                height={50}
+                className="rounded-full"
+            />
+            <span className="ml-2">
+                {channel.channel_name}
+            </span>
+        </td>
+        <td className="py-3 px-1 sm:px-3 hidden sm:table-cell">{channel.sub_org}</td>
+        <td className="py-3 px-1 sm:px-3 hidden sm:table-cell">{channel.video_count}</td>
+        <td className="py-3 px-1 sm:px-3">{Number(channel.subscribers).toLocaleString()}</td>
+        <td className="py-3 px-1 sm:px-3">
+            {channel.day_diff > 0 ? `+${Number(channel.day_diff).toLocaleString()}` : Number(channel.day_diff).toLocaleString()}
+        </td>
+    </tr>
+);
+
+export default ChannelRow;
\ No newline at end of file
-- 
cgit v1.2.3

