File size: 943 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 React from 'react';
import compose from 'recompose/compose';
import type { GetChannelType } from 'shared/graphql/queries/channel/getChannel';
import type { UserInfoType } from 'shared/graphql/fragments/user/userInfo';
import getChannelThreads from 'shared/graphql/queries/channel/getChannelThreadConnection';
import ThreadFeed from 'src/components/threadFeed';
import { withCurrentUser } from 'src/components/withCurrentUser';

const ChannelThreadFeed = compose(getChannelThreads)(ThreadFeed);

type Props = {
  channel: GetChannelType,
  currentUser: ?UserInfoType,
};

export default withCurrentUser((props: Props) => {
  const { channel } = props;

  return (
    <React.Fragment>
      <ChannelThreadFeed
        viewContext="channelProfile"
        slug={channel.slug}
        id={channel.id}
        setThreadsStatus={false}
        isNewAndOwned={false}
        channel={channel}
      />
    </React.Fragment>
  );
});