import { Channel } from "revolt-api"; import { Card, CardDescription, CardHeader, CardTitle } from "../ui/card"; import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar"; import { AUTUMN_URL } from "@/lib/constants"; export function ChannelCard({ channel, subtitle, }: { channel: Channel; subtitle: string; }) { if (channel.channel_type === "SavedMessages") return
Refusing to render.
; const name = channel.channel_type === "DirectMessage" ? "Direct Message" : channel.name; return ( {channel.channel_type !== "DirectMessage" && ( )} {name .split(" ") .slice(0, 2) .map((x) => String.fromCodePoint(x.codePointAt(0) ?? 32) ?? "") .join("")} {name} {subtitle} ); }