import { DiscordIcon, SlackIcon, TelegramIcon, } from "@/components/icons/notification-icons"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { api } from "@/utils/api"; import { BellRing, Mail } from "lucide-react"; import { AddNotification } from "./add-notification"; import { DeleteNotification } from "./delete-notification"; import { UpdateNotification } from "./update-notification"; export const ShowNotifications = () => { const { data } = api.notification.all.useQuery(); return (
Notifications Add your providers to receive notifications, like Discord, Slack, Telegram, Email. {data?.length === 0 ? (
To send notifications is required to set at least 1 provider.
) : (
{data?.map((notification, index) => (
{notification.notificationType === "slack" && ( )} {notification.notificationType === "telegram" && ( )} {notification.notificationType === "discord" && ( )} {notification.notificationType === "email" && ( )} {notification.name}
))}
)}
); };