From 282584cb718760f4d462b1d368af3237dea0b8c5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 13 Jul 2025 14:37:53 +0000 Subject: [PATCH 1/2] Replace Select with Dropdown for Slack channel selection Co-authored-by: natemkelley --- .../integrations/SlackIntegrations.tsx | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/apps/web/src/components/features/integrations/SlackIntegrations.tsx b/apps/web/src/components/features/integrations/SlackIntegrations.tsx index 509ab3b09..34f968871 100644 --- a/apps/web/src/components/features/integrations/SlackIntegrations.tsx +++ b/apps/web/src/components/features/integrations/SlackIntegrations.tsx @@ -14,8 +14,8 @@ import { } from '@/api/buster_rest/slack/queryRequests'; import { Dropdown, type DropdownItems } from '@/components/ui/dropdown'; import { LinkSlash, Refresh2 } from '@/components/ui/icons'; -import { Select } from '@/components/ui/select'; import { useMemoizedFn } from '@/hooks'; +import pluralize from 'pluralize'; import { StatusCard } from '@/components/ui/card/StatusCard'; export const SlackIntegrations = React.memo(() => { @@ -125,11 +125,12 @@ const ConnectedSlackChannels = React.memo(() => { const items = useMemo(() => { return channels.map((channel) => ({ label: channel.name, - value: channel.id + value: channel.id, + selected: channel.id === selectedChannelId })); - }, [channels]); + }, [channels, selectedChannelId]); - const onChange = useMemoizedFn((channelId: string) => { + const onSelect = useMemoizedFn((channelId: string) => { const channel = channels.find((channel) => channel.id === channelId); if (!channel) return; updateSlackIntegration({ @@ -168,15 +169,20 @@ const ConnectedSlackChannels = React.memo(() => { )} -