mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Chore: lint
This commit is contained in:
parent
f339ed2c7f
commit
984f69a738
@ -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',
|
||||
|
||||
@ -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 },
|
||||
|
||||
@ -307,4 +307,3 @@ export const followingQuery = gql`
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user