]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/discord-guilds/ChannelBox.js
snes settings
[alttp.git] / resources / js / components / discord-guilds / ChannelBox.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3
4 import Icon from '../common/Icon';
5
6 const getIcon = channel => {
7         if (channel.type === 0) {
8                 return <Icon.HASH title="" />;
9         }
10         if (channel.type === 2) {
11                 return <Icon.VOLUME title="" />;
12         }
13         return null;
14 };
15
16 const Box = ({ channel }) => <div className="channel-box">
17         {getIcon(channel)}
18         <span>{channel.name}</span>
19 </div>;
20
21 Box.propTypes = {
22         channel: PropTypes.shape({
23                 name: PropTypes.string,
24         }),
25 };
26
27 export default Box;