import type { ISubscription } from '@rocket.chat/core-typings'; import { useUserDisplayName } from '@rocket.chat/ui-client'; import { useUnreadOnlyToggle } from '../../contexts/RoomsNavigationContext'; import SidePanel from '../SidePanel'; import { useChannelsChildrenList } from '../hooks/useChannelsChildrenList'; export type SidePanelChannelsProps = { parentRid: string; subscription: ISubscription }; const SidePanelChannels = ({ parentRid, subscription }: SidePanelChannelsProps) => { const isDirectSubscription = subscription?.t === 'd'; const username = useUserDisplayName({ name: subscription?.fname, username: subscription?.name }); const [unreadOnly, toggleUnreadOnly] = useUnreadOnlyToggle(); const rooms = useChannelsChildrenList(parentRid, unreadOnly); return ( ); }; export default SidePanelChannels;