mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 10:15:58 +08:00
28 lines
685 B
JavaScript
28 lines
685 B
JavaScript
import React from 'react';
|
|
import MemberSinceInfo from '../components/MemberSinceInfo';
|
|
import { compose, gql } from 'react-apollo';
|
|
import { withFragments } from 'plugin-api/beta/client/hocs';
|
|
|
|
class MemberSinceInfoContainer extends React.Component {
|
|
render() {
|
|
return (
|
|
<MemberSinceInfo memberSinceDate={this.props.comment.user.created_at} />
|
|
);
|
|
}
|
|
}
|
|
|
|
const withMemberSinceInfoFragments = withFragments({
|
|
comment: gql`
|
|
fragment TalkMemberSince_MemberSinceInfo_comment on Comment {
|
|
user {
|
|
username
|
|
created_at
|
|
}
|
|
}
|
|
`,
|
|
});
|
|
|
|
const enhance = compose(withMemberSinceInfoFragments);
|
|
|
|
export default enhance(MemberSinceInfoContainer);
|