From fcccb9df68f0c27890a431a132a2e3e59f1ba80d Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Wed, 30 Nov 2016 23:32:22 +0100 Subject: Add basic user profiles. --- src/components/user_profile/user_profile.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/components/user_profile/user_profile.js (limited to 'src/components/user_profile/user_profile.js') diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js new file mode 100644 index 00000000..4d52bc95 --- /dev/null +++ b/src/components/user_profile/user_profile.js @@ -0,0 +1,17 @@ +import UserCardContent from '../user_card_content/user_card_content.vue' +import { find } from 'lodash' + +const UserProfile = { + computed: { + user () { + const id = this.$route.params.id + const user = find(this.$store.state.users.users, {id}) + return user + } + }, + components: { + UserCardContent + } +} + +export default UserProfile -- cgit v1.2.3-70-g09d2