"use client" import {NotificationChannel, NotificationChannelWith} from "@/db/schema/09_notification-channel"; import {CardsWithPagination} from "@/components/wrappers/common/cards-with-pagination"; import {NotifierCard} from "@/components/wrappers/dashboard/common/notifier/notifier-card/notifier-card"; import {useState} from "react"; import {EmptyStatePlaceholder} from "@/components/wrappers/common/empty-state-placeholder"; import {OrganizationWithMembers} from "@/db/schema/03_organization"; import {NotifierAddEditModal} from "@/components/wrappers/dashboard/common/notifier/notifier-add-edit-modal"; type NotificationChannelsSectionProps = { notificationChannels: NotificationChannelWith[] organizations: OrganizationWithMembers[] } export const NotificationChannelsSection = ({ organizations, notificationChannels }: NotificationChannelsSectionProps) => { const [isAddModalOpen, setIsAddModalOpen] = useState(false); const hasNotifiers = notificationChannels.length > 0; return (
{hasNotifiers ? (
) : ( { setIsAddModalOpen(true) }} className="h-full" /> )}
); }