mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Resolve linter issues
This commit is contained in:
@@ -19,7 +19,10 @@ const mapDispatchToProps = dispatch =>
|
||||
);
|
||||
|
||||
const enhance = compose(
|
||||
connect(mapStateToProps, mapDispatchToProps),
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
),
|
||||
withTags('featured')
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@ const mapDispatchToProps = dispatch =>
|
||||
);
|
||||
|
||||
const enhance = compose(
|
||||
connect(null, mapDispatchToProps),
|
||||
connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
),
|
||||
withTags('featured')
|
||||
);
|
||||
|
||||
|
||||
+14
-2
@@ -12,7 +12,13 @@ class ModIndicatorSubscription extends React.Component {
|
||||
document: COMMENT_FEATURED_SUBSCRIPTION,
|
||||
updateQuery: (
|
||||
prev,
|
||||
{ subscriptionData: { data: { commentFeatured: { comment } } } }
|
||||
{
|
||||
subscriptionData: {
|
||||
data: {
|
||||
commentFeatured: { comment },
|
||||
},
|
||||
},
|
||||
}
|
||||
) => {
|
||||
return this.props.handleCommentChange(prev, comment);
|
||||
},
|
||||
@@ -21,7 +27,13 @@ class ModIndicatorSubscription extends React.Component {
|
||||
document: COMMENT_UNFEATURED_SUBSCRIPTION,
|
||||
updateQuery: (
|
||||
prev,
|
||||
{ subscriptionData: { data: { commentUnfeatured: { comment } } } }
|
||||
{
|
||||
subscriptionData: {
|
||||
data: {
|
||||
commentUnfeatured: { comment },
|
||||
},
|
||||
},
|
||||
}
|
||||
) => {
|
||||
return this.props.handleCommentChange(prev, comment);
|
||||
},
|
||||
|
||||
@@ -28,7 +28,13 @@ class ModSubscription extends React.Component {
|
||||
},
|
||||
updateQuery: (
|
||||
prev,
|
||||
{ subscriptionData: { data: { commentFeatured: { user, comment } } } }
|
||||
{
|
||||
subscriptionData: {
|
||||
data: {
|
||||
commentFeatured: { user, comment },
|
||||
},
|
||||
},
|
||||
}
|
||||
) => {
|
||||
const notifyText =
|
||||
this.props.user.id === user.id
|
||||
@@ -50,7 +56,9 @@ class ModSubscription extends React.Component {
|
||||
prev,
|
||||
{
|
||||
subscriptionData: {
|
||||
data: { commentUnfeatured: { user, comment } },
|
||||
data: {
|
||||
commentUnfeatured: { user, comment },
|
||||
},
|
||||
},
|
||||
}
|
||||
) => {
|
||||
@@ -117,7 +125,10 @@ const mapStateToProps = state => ({
|
||||
});
|
||||
|
||||
export default compose(
|
||||
connect(mapStateToProps, null),
|
||||
connect(
|
||||
mapStateToProps,
|
||||
null
|
||||
),
|
||||
withVariables,
|
||||
withSubscribeToMore
|
||||
)(ModSubscription);
|
||||
|
||||
@@ -22,7 +22,10 @@ const fragments = {
|
||||
`,
|
||||
};
|
||||
const enhance = compose(
|
||||
connect(null, mapDispatchToProps),
|
||||
connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
),
|
||||
withTags('featured', { fragments })
|
||||
);
|
||||
|
||||
|
||||
@@ -90,7 +90,10 @@ const mapDispatchToProps = dispatch =>
|
||||
);
|
||||
|
||||
const enhance = compose(
|
||||
connect(null, mapDispatchToProps),
|
||||
connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
),
|
||||
withFetchMore,
|
||||
withVariables,
|
||||
withFragments({
|
||||
|
||||
@@ -59,8 +59,14 @@ module.exports = {
|
||||
addTag: {
|
||||
async post(
|
||||
obj,
|
||||
{ tag: { name, id, item_type } },
|
||||
{ user, mutators: { Comment }, pubsub }
|
||||
{
|
||||
tag: { name, id, item_type },
|
||||
},
|
||||
{
|
||||
user,
|
||||
mutators: { Comment },
|
||||
pubsub,
|
||||
}
|
||||
) {
|
||||
if (name === 'FEATURED' && item_type === 'COMMENTS') {
|
||||
const comment = await Comment.setStatus({
|
||||
@@ -76,8 +82,14 @@ module.exports = {
|
||||
removeTag: {
|
||||
async post(
|
||||
obj,
|
||||
{ tag: { name, id, item_type } },
|
||||
{ user, loaders: { Comments }, pubsub }
|
||||
{
|
||||
tag: { name, id, item_type },
|
||||
},
|
||||
{
|
||||
user,
|
||||
loaders: { Comments },
|
||||
pubsub,
|
||||
}
|
||||
) {
|
||||
if (name === 'FEATURED' && item_type === 'COMMENTS') {
|
||||
const comment = await Comments.get.load(id);
|
||||
|
||||
Reference in New Issue
Block a user