mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 21:27:02 +08:00
43 lines
1020 B
JavaScript
43 lines
1020 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import IgnoredUserSection from '../components/IgnoredUserSection';
|
|
import { compose, gql } from 'react-apollo';
|
|
import {
|
|
withFragments,
|
|
withStopIgnoringUser,
|
|
} from 'plugin-api/beta/client/hocs';
|
|
|
|
class IgnoredUserSectionContainer extends React.Component {
|
|
render() {
|
|
return (
|
|
<IgnoredUserSection
|
|
stopIgnoringUser={this.props.stopIgnoringUser}
|
|
ignoredUsers={this.props.root.me.ignoredUsers}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
IgnoredUserSectionContainer.propTypes = {
|
|
stopIgnoringUser: PropTypes.func.isRequired,
|
|
root: PropTypes.object.isRequired,
|
|
};
|
|
|
|
const withIgnoredUserSectionFragments = withFragments({
|
|
root: gql`
|
|
fragment TalkIgnoreUser_IgnoredUserSection_root on RootQuery {
|
|
me {
|
|
id
|
|
ignoredUsers {
|
|
id
|
|
username
|
|
}
|
|
}
|
|
}
|
|
`,
|
|
});
|
|
|
|
const enhance = compose(withIgnoredUserSectionFragments, withStopIgnoringUser);
|
|
|
|
export default enhance(IgnoredUserSectionContainer);
|