From 8363c08bb6c27550a16b302afcecf1a06c0b5919 Mon Sep 17 00:00:00 2001 From: zuies Date: Fri, 22 Dec 2023 18:08:54 +0300 Subject: [PATCH] remove old channelList component --- src/components/pages/login/ChannelList.tsx | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 src/components/pages/login/ChannelList.tsx diff --git a/src/components/pages/login/ChannelList.tsx b/src/components/pages/login/ChannelList.tsx deleted file mode 100644 index 91c38db6..00000000 --- a/src/components/pages/login/ChannelList.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { FormControlLabel, Checkbox } from '@mui/material'; -import { FiAlertTriangle } from 'react-icons/fi'; -import { ISubChannels } from '../../../utils/types'; - -type IChannelListProps = { - guild: any; - showFlag: boolean; - onChange: (channelId: string, subChannelId: string, status: boolean) => void; - handleCheckAll: (guild: any, status: boolean) => void; -}; - -export default function ChannelList({ - guild, - onChange, - handleCheckAll, - showFlag, -}: IChannelListProps) { - const subChannelsList = ( - <> -

Channels

- {guild.subChannels.map((channel: ISubChannels, index: any) => ( -
-
- - onChange( - guild.channelId, - channel.channelId, - e.target.checked - ) - } - /> - } - label={channel.name} - /> - {showFlag && !channel.canReadMessageHistoryAndViewChannel ? ( -
- - - {!channel.canReadMessageHistoryAndViewChannel - ? 'Bot needs access' - : ''} - -
- ) : ( - '' - )} -
-
- ))} - - ); - - return ( -
-

{guild.title}

-
- item)} - color="secondary" - onChange={(e) => handleCheckAll(guild, e.target.checked)} - /> - } - /> - {subChannelsList} -
-
- ); -} - -ChannelList.defaultProps = { - showFlag: false, -};