File size: 1,256 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 34 35 36 37 38 39 40 41 42 43 44 45 46 |
// @flow
import * as React from 'react';
import { SectionsContainer, Column } from 'src/components/settingsViews/style';
import EditForm from './editForm';
import ChannelMembers from './channelMembers';
import { ErrorBoundary, SettingsFallback } from 'src/components/error';
type Props = {
community: Object,
channel: Object,
communitySlug: string,
};
class Overview extends React.Component<Props> {
render() {
const { channel } = this.props;
return (
<SectionsContainer data-cy="channel-overview">
<Column>
<ErrorBoundary fallbackComponent={SettingsFallback}>
<EditForm channel={channel} />
</ErrorBoundary>
</Column>
<Column>
{channel.isPrivate && (
<span>
<ErrorBoundary fallbackComponent={SettingsFallback}>
<ChannelMembers channel={channel} id={channel.id} />
</ErrorBoundary>
</span>
)}
<ErrorBoundary fallbackComponent={SettingsFallback}>
{!channel.isPrivate && (
<ChannelMembers channel={channel} id={channel.id} />
)}
</ErrorBoundary>
</Column>
</SectionsContainer>
);
}
}
export default Overview;
|