Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

refactor(web): drop nested ternary in notification channel list (#19488)

cursor[bot]8f809ee36b9b
diff --git a/web/src/features/notifications/components/ProjectNotificationChannelsList.tsx b/web/src/features/notifications/components/ProjectNotificationChannelsList.tsx
index e68a50a616..d1f12ad5da 100644
--- a/web/src/features/notifications/components/ProjectNotificationChannelsList.tsx
+++ b/web/src/features/notifications/components/ProjectNotificationChannelsList.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable no-nested-ternary */
import { SiPagerduty, SiSlack } from "@langfuse/icons/si";
import { Webhook, Plus, Pencil, Trash2 } from "@langfuse/icons";
@@ -52,9 +51,10 @@ export function ProjectNotificationChannelsList({
}: ProjectNotificationChannelsListProps) {
return (
<div className="flex flex-col gap-4">
- {isLoading ? (
+ {isLoading && (
<p className="text-muted-foreground text-sm">Loading channels...</p>
- ) : !channels || channels.length === 0 ? null : (
+ )}
+ {!isLoading && channels && channels.length > 0 && (
<div className="flex flex-col gap-3">
{channels.map((channel) => (
<div