import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Separator } from "@/components/ui/separator" import { getColor } from "@/lib/colors" import { Guild } from "@/lib/schema/guild" import { cn } from "@/lib/utils" import Link from "next/link" type SidebarProps = { guild: Guild["guild"] } export default function Sidebar({ guild }: SidebarProps) { const tagColor = getColor(guild.tagColor, "text", "gray") return ( {guild.tag !== undefined ? `[${guild.tag}]` : "No Guild Tag"} {guild.description !== undefined ? :

No guild description.

}
) } function ReplaceLinks({ text }: { text: string }) { const regex = /(https?:\/\/[^\s/$.?#].[^\s]*)/g const parts = text.split(regex) return (
{parts.map((part, index) => { if (regex.test(part)) { return ( {part} ) } return part })}
) }