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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user