databag/net/web/src/session/channels/Channels.jsx

31 lines
839 B
React
Raw Normal View History

2022-08-09 18:14:36 +00:00
import { Input, List } from 'antd';
2022-08-08 06:30:34 +00:00
import { ChannelsWrapper } from './Channels.styled';
import { SearchOutlined } from '@ant-design/icons';
2022-08-09 18:14:36 +00:00
import { useChannels } from './useChannels.hook';
import { ChannelItem } from './channelItem/ChannelItem';
2022-08-08 06:30:34 +00:00
2022-08-05 22:06:53 +00:00
export function Channels() {
2022-08-09 18:14:36 +00:00
const { state, actions } = useChannels();
console.log(state);
2022-08-08 06:30:34 +00:00
return (
<ChannelsWrapper>
<div class="search">
<div class="filter">
<Input bordered={false} allowClear={true} placeholder="Channels" prefix={<SearchOutlined />} />
</div>
</div>
2022-08-09 18:14:36 +00:00
<div class="results">
<List local={{ emptyText: '' }} itemLayout="horizontal" dataSource={state.channels} gutter="0"
renderItem={item => (
<ChannelItem item={item} />
)}
/>
</div>
2022-08-08 06:30:34 +00:00
</ChannelsWrapper>
);
2022-08-05 22:06:53 +00:00
}