"use client"; import Image from "next/image"; import type React from "react"; import type { TwitchChannelDataProp } from "./TwitchDataTable"; interface TwitchRowProps { channel: TwitchChannelDataProp; index: number; } const TwitchTableRow: React.FC = ({ channel, index }) => ( (window.location.href = "/stats/" + channel.channel_name)} > {index + 1} {channel.channel_name} {channel.channel_name} { (() => { const words = channel.channel_name.split(' '); if (words.length >= 2) { return `${words[0][0]}.${words[1][0]}`; } else if (words.length === 1) { return `${words[0][0]}.`; } return ''; })() } {channel.sub_org} {Number(channel.subscribers).toLocaleString()} {Number(channel.twitch_followers).toLocaleString()} {Number(channel.total_sum).toLocaleString()} {channel.max_following !== undefined && ( channel.subscribers ? "text-purple-500" // Twitch color : channel.subscribers > channel.twitch_followers ? "text-red-600" // YouTube color : "" } > {channel.max_following.toLocaleString() || "0"} )} ); export default TwitchTableRow;