diff --git a/webapp/components/features/FollowList/FollowList.story.js b/webapp/components/features/FollowList/FollowList.story.js index b8cc02978..0d117df95 100644 --- a/webapp/components/features/FollowList/FollowList.story.js +++ b/webapp/components/features/FollowList/FollowList.story.js @@ -7,66 +7,66 @@ import FollowList from './FollowList.vue' helpers.init() -const sevenConnectionsUser = { +const user = { name: 'Jenny Rostock', id: 'u3', followedByCount: 12, followedBy: helpers.fakeUser(7), + followingCount: 28, + following: helpers.fakeUser(7), } const allConnectionsUser = { - ...sevenConnectionsUser, - followedBy: [...sevenConnectionsUser.followedBy, ...helpers.fakeUser(5)], + ...user, + followedBy: [...user.followedBy, ...helpers.fakeUser(5)], + following: [...user.following, ...helpers.fakeUser(21)], +} + +const noConnectionsUser = { + ...user, + followedBy: [], + followedByCount: 0, + following: [], + followingCount: 0, } storiesOf('FollowList', module) .addDecorator(withA11y) .addDecorator(helpers.layout) .add('without connections', () => { - const user = { - ...sevenConnectionsUser, - followedBy: [], - followedByCount: 0, - } return { components: { FollowList }, store: helpers.store, data() { - return { user } + return { user: noConnectionsUser } }, - template: ``, + template: `
`, } }) .add('with up to 7 connections', () => { - const user = sevenConnectionsUser return { components: { FollowList }, store: helpers.store, data() { - return { - user, - } + return { user: { ...user } } }, methods: { fetchAllConnections(type) { - this.user = allConnectionsUser + this.user[type] = allConnectionsUser[type] action('fetchAllConnections')(type, this.user) }, }, - template: ``, + template: `
`, } }) - .add('with more than 7 connections', () => { - const user = allConnectionsUser + .add('with all connections', () => { return { components: { FollowList }, store: helpers.store, data() { - return { - user, - } + return { user: allConnectionsUser } }, - template: ``, + template: `
`, } }) diff --git a/webapp/components/features/FollowList/FollowList.vue b/webapp/components/features/FollowList/FollowList.vue index 06ce5201f..4e3f5601d 100644 --- a/webapp/components/features/FollowList/FollowList.vue +++ b/webapp/components/features/FollowList/FollowList.vue @@ -117,7 +117,7 @@ export default {