diff options
Diffstat (limited to 'src/components/user_profile')
| -rw-r--r-- | src/components/user_profile/user_profile.js | 17 | ||||
| -rw-r--r-- | src/components/user_profile/user_profile.vue | 14 |
2 files changed, 31 insertions, 0 deletions
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 diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue new file mode 100644 index 00000000..767982c5 --- /dev/null +++ b/src/components/user_profile/user_profile.vue @@ -0,0 +1,14 @@ +<template> + <div class="user-profile panel panel-default"> + <user-card-content :user="user"></user-card-content> + </div> +</template> + +<script src="./user_profile.js"></script> + +<style> + .user-profile { + flex: 2; + flex-basis: 500px; + } +</style> |
