// @flow import React from 'react'; import compose from 'recompose/compose'; import { Link } from 'react-router-dom'; import type { ChannelInfoType } from 'shared/graphql/fragments/channel/channelInfo'; import { ErrorBoundary } from 'src/components/error'; import { withCurrentUser } from 'src/components/withCurrentUser'; import Icon from 'src/components/icon'; import { ChannelRow, ChannelContent, Label, Description, ChannelActions, } from './style'; type Props = { channel: ?ChannelInfoType, id: string, name?: string, description?: ?string, currentUser: ?Object, children?: React$Node, isActive?: boolean, }; const Channel = (props: Props) => { const { channel, name, description, children, isActive = false } = props; if (!channel) return null; return ( {name && ( )} {description && {description}} {children} ); }; export const ChannelListItem = compose(withCurrentUser)(Channel);