Chore: lint

This commit is contained in:
Raphael Beer 2020-03-19 01:58:28 +01:00
parent f339ed2c7f
commit 984f69a738
No known key found for this signature in database
GPG Key ID: C1AC5E018B25EF11
4 changed files with 5 additions and 16 deletions

View File

@ -8,8 +8,6 @@ config.stubs['client-only'] = '<span><slot /></span>'
config.stubs['ds-space'] = '<span><slot /></span>'
config.stubs['nuxt-link'] = '<span><slot /></span>'
let user, additionalConnections
describe('FollowList.vue', () => {
let store, mocks, getters, propsData
@ -75,7 +73,7 @@ describe('FollowList.vue', () => {
})
})
user = {
const user = {
name: 'Jenny Rostock',
id: 'u3',
followedByCount: 32,
@ -156,7 +154,7 @@ user = {
],
}
additionalConnections = {
const additionalConnections = {
followedBy: [
{
id: '9f305e7a-ae5a-4e22-8269-8b6899af674f',

View File

@ -12,11 +12,11 @@
<user-teaser :user="follow" />
</client-only>
</ds-space>
<ds-space v-if="this.counts[this.type] - this.connections.length" margin="small">
<ds-space v-if="this.allConnectionsCount - this.connections.length" margin="small">
<base-button @click="fetchConnections" size="small" color="softer">
{{
$t('profile.network.andMore', {
number: this.counts[this.type] - this.connections.length,
number: this.allConnectionsCount - this.connections.length,
})
}}
</base-button>
@ -32,14 +32,12 @@
<script>
import uniqBy from 'lodash/uniqBy'
import UserAvatar from '~/components/_new/generic/UserAvatar/UserAvatar'
import UserTeaser from '~/components/UserTeaser/UserTeaser'
import { followedByQuery, followingQuery } from '~/graphql/User'
export default {
name: 'FollowerList',
components: {
UserAvatar,
UserTeaser,
},
props: {
@ -49,14 +47,11 @@ export default {
data() {
return {
connections: this.user[this.type],
allConnectionsCount: this.user[`${this.type}Count`],
queries: {
followedBy: followedByQuery,
following: followingQuery,
},
counts: {
followedBy: this.user.followedByCount,
following: this.user.followingCount,
},
}
},
computed: {
@ -70,7 +65,6 @@ export default {
return uniqBy(items, field)
},
async fetchConnections() {
const query = this.queries[this.type]
const { data } = await this.$apollo.query({
query: this.queries[this.type],
variables: { id: this.user.id },

View File

@ -307,4 +307,3 @@ export const followingQuery = gql`
}
}
`

View File

@ -215,7 +215,6 @@
<script>
import uniqBy from 'lodash/uniqBy'
import UserTeaser from '~/components/UserTeaser/UserTeaser'
import PostTeaser from '~/components/PostTeaser/PostTeaser.vue'
import HcFollowButton from '~/components/FollowButton.vue'
import HcCountTo from '~/components/CountTo.vue'
@ -244,7 +243,6 @@ const tabToFilterMapping = ({ tab, id }) => {
export default {
components: {
UserTeaser,
PostTeaser,
HcFollowButton,
HcCountTo,