mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
replaced eslint:recommended with prettier
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import React from 'react';
|
||||
import styles from './SubscriberBadge.css';
|
||||
import {t} from 'plugin-api/beta/client/services';
|
||||
import { t } from 'plugin-api/beta/client/services';
|
||||
|
||||
export default () =>(
|
||||
<span className={styles.badge}>
|
||||
{t('talk-plugin-subscriber.subscriber')}
|
||||
</span>
|
||||
export default () => (
|
||||
<span className={styles.badge}>{t('talk-plugin-subscriber.subscriber')}</span>
|
||||
);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import SubscriberBadge from '../components/SubscriberBadge';
|
||||
import {compose, gql} from 'react-apollo';
|
||||
import {withFragments, excludeIf} from 'plugin-api/beta/client/hocs';
|
||||
import { compose, gql } from 'react-apollo';
|
||||
import { withFragments, excludeIf } from 'plugin-api/beta/client/hocs';
|
||||
|
||||
const isSubscriber = (tags = []) => tags.some((t) => t.tag.name === 'SUBSCRIBER');
|
||||
const isSubscriber = (tags = []) => tags.some(t => t.tag.name === 'SUBSCRIBER');
|
||||
|
||||
const enhance = compose(
|
||||
withFragments({
|
||||
@@ -15,9 +15,10 @@ const enhance = compose(
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
}
|
||||
`,
|
||||
}),
|
||||
excludeIf(({comment}) => !isSubscriber(comment.user.tags))
|
||||
excludeIf(({ comment }) => !isSubscriber(comment.user.tags))
|
||||
);
|
||||
|
||||
|
||||
export default enhance(SubscriberBadge);
|
||||
|
||||
@@ -4,6 +4,6 @@ import translations from './translations.yml';
|
||||
export default {
|
||||
translations,
|
||||
slots: {
|
||||
commentAuthorTags: [SubscriberBadge]
|
||||
}
|
||||
commentAuthorTags: [SubscriberBadge],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user