"use client" import { ServerWithMembersWithProfiles } from "@/types"; import { ChannelType, MemberRole } from "@prisma/client"; import { ActionTooltip } from "../action-tooltip"; import { Plus, Settings } from "lucide-react"; import { useModal } from "@/hooks/use-modal-store"; interface ServerSectionProps { label: string; role?: MemberRole; sectionType: "channels" | "members"; channelType?: ChannelType; server?: ServerWithMembersWithProfiles; } export const ServerSection = ({ label, role, sectionType, channelType, server }: ServerSectionProps)=> { const {onOpen } = useModal(); return (
{label}
{role !== MemberRole.GUEST && sectionType === "channels" && (