Refactor Discord channel resource management and update imports

- Consolidated channel type definitions by moving them to discord-channel-types.ts for better organization.
- Removed redundant DASHBOARD_CHANNEL_TYPES and updated exports to streamline channel handling in the application.
- Enhanced type safety by utilizing the ChannelKind type in the discord-channel-select component.
This commit is contained in:
TheOnlyMace
2026-07-22 21:25:58 +02:00
parent ed2ea23e87
commit 042f68e777
3 changed files with 34 additions and 30 deletions

View File

@@ -16,11 +16,9 @@ import {
import { DiscordResourceMultiSelect } from '@/components/ui/discord-resource-multi-select';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { useGuildChannels } from '@/hooks/use-guild-channels';
import { CHANNEL_TYPES, channelPrefix } from '@/lib/discord-guild-resources';
import { CHANNEL_TYPES, channelPrefix, type ChannelKind } from '@/lib/discord-channel-types';
import { cn } from '@/lib/utils';
type ChannelKind = keyof typeof CHANNEL_TYPES;
function filterChannels(
channels: DiscordChannelOption[],
kinds: ChannelKind[] | undefined