File size: 744 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
// @flow
import * as React from 'react';
import {
ChannelContainer,
ChannelNameLink,
ChannelName,
ChannelActions,
} from './style';
import type { ChannelInfoType } from 'shared/graphql/fragments/channel/channelInfo';
type Props = {
children: React$Node,
channel: ChannelInfoType,
};
class ChannelListItem extends React.Component<Props> {
render() {
const { channel, children } = this.props;
return (
<ChannelContainer>
<ChannelNameLink to={`/${channel.community.slug}/${channel.slug}`}>
<ChannelName>{channel.name}</ChannelName>
</ChannelNameLink>
{children && <ChannelActions>{children}</ChannelActions>}
</ChannelContainer>
);
}
}
export default ChannelListItem;
|